Sunday, 10 December 2017

GeoJSON Styling information


As far as I can see there is nothing in the GeoJSON standard to store styling information, i.e. line colours, thicknesses etc.



Am I missing something or is this just something that GeoJSON doesn't deal with?



Answer



For GeoJSON - CSS styles are used to modify your points, line, polygons with thickness & color


{ 
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[
[-180.0, 10.0], [20.0, 90.0], [180.0, -5.0], [-30.0, -90.0]
]]

},
"style": {
"__comment": "all SVG styles allowed",
"fill":"red",
"stroke-width":"3",
"fill-opacity":0.6
},
"className": {
"baseVal":"A class name"
}

}

http://wiki.openstreetmap.org/wiki/Geojson_CSS


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...