Converting to geojson file format (plain text) using Ogre web client

The ogre web client is an online resource that assists in converting different file formats to geojson file format. In the case of ogre, the output is a plain text file that can simply be copied and pasted right into the javascript section of the HTML web page.

We will show a simple demonstration below where a shapefile is converted

to geojson format and loaded in as a layer in a leaflet powered map.

 

Click http://ogre.adc4gis.com/  to open the ogre web client

 

Capture-7

 

Click on Browse and load in the shapefile. Before loading the shape file,

create a Zip file containing the .shp, .shx, .dbf and .prj file. Ogre web client accepts the

shapefile in Zipped file format. Once the file is loaded, click on CONVERT TO GEOJSON tab.

 

Capture-9

 

The output is in plain text format as shown in the screenshot below. Copy the contents of the window.

 

Capture-10

 

Copy and paste the contents to the script  as in the source code below

The copied plain text is illustrated as red text.

 

Document3-001

Capture-16

 

See live map by clicking this link:

https://github.com/mayotunde/line/blob/gh-pages/ogreconvert

Download plain text version of the source code by clicking the link below:

https://www.dropbox.com/s/cfjghlm59cjwiha/Converting%20to%20geojson%20text%20format%20using%20ogre%20web%20client.txt?dl=0

 

Thank you for following the blog.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s