0

I have spent quite a lot of time Googling which brought me many places including this site, but I haven't found the resolution.

I have a KML that presents a PNG. Radio Mobile generated the files and it lines up wonderfully. However, I need it as a polygon. The PNG itself doesn't contain any geo-referencing information as that's what the KML's purpose is. However, ArcMap 10 can't take the layer as an input in the raster conversion and when I specify just the PNG, it just makes a solid square that is (as I assumed) not in the right location.

Exported KML and PNG: https://www.dropbox.com/s/ug6feyvu7mgnntv/ICS%20Basic%2011.kml?dl=0 https://www.dropbox.com/s/ma26e01l7jtvshp/ICS%20Basic%2011.png?dl=0

Screenshot: https://www.dropbox.com/s/zcu0czbx7wofzmj/raster%20to%20polygon.PNG?dl=0

  • Can QGIS open it? It's free to download and IMHO handles KML better than ArcMap. If that doesn't work then you might need to get the coordinates from the KML using notepad(++) or other XML reader and write your own world file (PGW). – Michael Stimson Feb 17 '15 at 0:01
  • 2
    I think you should include any graphics as pictures in your question. Many potential answerers will not visit DropBox locations - certainly not until they have a good idea of what they will be finding there. – PolyGeo Feb 17 '15 at 1:05
1

I got what I was after, but I want to make sure I have all of the necessary and none of the unnecessary steps so that people can replicate it in the future.

Per this page: http://memhamwan.org/user-coverage-map-how-is-it-made/

I ran (after setting PATH and GDAL_DATA environmental variables properly): gdal_translate -of PNG -a_srs EPSG:4326 -a_ullr -88.94745 42.17275 -87.9351 41.41801 "ICS Basic 11.png" "ICS Basic 11-geo.png"

I got the lat\long from the KML itself: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <GroundOverlay><name>ICS Basic 11.png</name><color>88ffffff</color><Icon> <href>ICS Basic 11.png</href> <viewBoundScale>0.75</viewBoundScale></Icon><LatLonBox> <north> 42.17275</north> <south> 41.41801</south> <east>-87.9351</east> <west>-88.94745</west> </LatLonBox></GroundOverlay></kml>

It gave me a georeferenced PNG slightly smaller than the original from Radio Mobile. I added that to QGIS. I went to the properties for that layer and set the Style to only band 3 and transparency to 255 to property view the file. I then ran a polygonize, appending -b 3 to the end of the command. It gave me a shapefile that ArcMap still didn't seem to like, so I exported it as a KML.

The KML loaded in ArcMap as a polygon.

1

I made a Makefile to do this for RadioMobile or SPLAT kml output: https://github.com/thadk/polygonize-kml-groundoverlay

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.