SHP and JSON Mutual transfer (reprint)

Source: Internet
Author: User

For GIS development, these 2 kinds of data formats are too important.


This is easier, the method is more AH. You want to use SHP to define your own coordinate string json, in fact, the method is still more, there is no direct but indirect many.


Using tools in ArcMap can be converted directly, not much nonsense. No, check it out for yourself.

(2) SHP has published a map service, then by requesting the rest service to return Geomerty, the format is JSON, you can also get

(3) Gdal tool, get the Geojson format AH


Plug-in to see if the Gdal tools, not installed self-installation

Find Ogr2ogr.exe and drag it into CMD.

Input command, mainly the path of the source file shp, the path of the target file JSON, the main conversion has a warning, is not supported in Chinese Ah, and the file directory also do not have Chinese, otherwise it will error.

The main purpose is to get the coordinate string, the result is OK.

(4) ARCGIS10.2 above, support geometry turn Wkt/json

Refer to, this buddy's blog is very powerful.

Because I am still 10.0, did not personally try, but certainly is no problem ah.

(5) Online shp transfer Geojson


But I don't know how to work it.

(6) Mapshaper, this online is very good, you can drag shp, obviously HTML5 do ah, good!

Can not be converted, the main purpose seems to be to simplify the extraction of SHP.

Two. JSON to SHP

It seems not good, I searched for a long time ah.

(1) It is possible to pass the method mentioned in 1 (4). It's the JSON format that ArcGIS knows.

(2) Mapshaper, online conversion Geojson

JSON specific use of the time must be based on their own needs to deal with the above results, specific whether you use the manual or write procedures to deal with the look at their own.

For reference only, if you have a better way, you can exchange learning Ah, thank you!

SHP and JSON Mutual transfer (reprint)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.