0

I want to create a media wiki page with map option where polygon required the following format. What is name of this format and how can it possible to extract this format from shapefile?

polygons=62.103882522897855,5.09765625:58.309488840677645,5.712890625:58.95000823335702,10.8984375:61.68987220046001,12.83203125:63.35212928507874,11.865234375:64.1297836764257,13.974609375

Detailed format can be found here

http://semantic-mediawiki.org/wiki/Maps_examples/Google_Maps_shapes

1

Can you write python? If so then use shapely and Fiona to extract that information from a shapefile.

Fiona - wraps the OGR libraries in a Pythonic way - pip install Fiona Shapely - provides Pythonic style bindings to GEOS - pip install Shapely

Here is a github repo where I show some basic usage of shapely and fiona https://github.com/thesteve0/shapefileconverter

If you are a Java fan you can use JTS.

You could also use ogr2ogr to export your shapefiles to JSON or XML and work with it from there.

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.