Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I am having trouble producing a topojson that displays the shapefile correctly in power BI using mapshaper, can anyone help? I see I am not the first person to have this issue but none of the previous posts match my particular issue. The source of the shapefile is the Office of National Statistics (ONS) in the UK Apr 2019 CCG boundaries I downloaded the shapefile and associated files including ,prj, dbf,cpg and shx files.
I then imported these 5 files into the mapshaper conversion tool the data displayed correctly:
I then did a conversion from shapefile to topojson using the default settings. The conversion completed with no errors and I saved the 174kb topojson file that was generated. The topojson has the CCG Name as the location identifier. I would have attached the file but apparently cant do that with forum tools
When I create a custom CCG boundary shape map in power BI using the topojson as the map source and the CCG Name (from a table) the map visual appears corrupted:
I have tried generating the topojson with other tools like MyGeo and I get the same result. If I import the topojson generated from Mapshaper back into mapshaper the shape map displays as expected. I have tried generating the topojson from the .shp file only and from the shp, dbf and prj files only end result is the same. I have also tried using the simplify function in mapshaper to lower topojson file size still shape map does not display in Power BI. I should say I have done successful conversions that have displayed correctly on earlier CCG data which makes me think it is something to do with the shapefile source but I do not have the level of knowledge to be able to troubleshoot this, can anyone in the community help? by downloading the ONS files from source link provided and seeing if they can produce a topojson that works because I am stumped. I am using the latest update of Power BI Professional
thanks in advance
Solved! Go to Solution.
Make sure that you export from mapshaper in 'wgs84' (co-ordinate system). It's straightforward to do -> In the console in mapshaper type proj wgs84
then export as topojson
Hi HotChilli,
Did it, worked a treat, I dont suppose you would be willing to explain in a short paragraph and laymans terms why the extra step is needed? Does it allow certain crucial data to be added to the topojson when it is written for export? If so what is that data and why is it important. Alternatively if there is a simple explanation somewhere on the web then just include the link 🙂
Many thanks have marked your post as the solution
Make sure that you export from mapshaper in 'wgs84' (co-ordinate system). It's straightforward to do -> In the console in mapshaper type proj wgs84
then export as topojson
Hi HotChilli,
Did it, worked a treat, I dont suppose you would be willing to explain in a short paragraph and laymans terms why the extra step is needed? Does it allow certain crucial data to be added to the topojson when it is written for export? If so what is that data and why is it important. Alternatively if there is a simple explanation somewhere on the web then just include the link 🙂
Many thanks have marked your post as the solution
It's all about co-ordinate reference systems. The map you originally loaded into powerbi wasn't in a reference system that it could display as you wanted. It processed the file and displayed it (after all it was a topojson file with numbers) but not what you wanted.
WGS84 is "Earth-centered, Earth-fixed terrestrial reference system and geodetic datum". It's a standard that allows gps data and a 3d world to be mapped.
All you did in mapshaper was take a file that was in one reference system and convert it to another. And powerbi liked the wgs84 one.
HI! Jumping on this as I'm trying to work it out too - I had the same issue as above, followed the same instructions and inputted WGS84 into the console on mapshaper, but its pulling up an error saying 'unknown projection description'. Is there a way around this?
I've just imported a administrative boundary shapefile; should it be in a different format? Thank you!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
101 | |
74 | |
70 | |
47 |
User | Count |
---|---|
146 | |
107 | |
106 | |
89 | |
65 |