Giter Club home page Giter Club logo

iran-geojson-map-boundaries's Introduction

Iran-geojson-map-boundaries

Its a simple and powerfull script that can help you generate unique points within every Iranian states as much as you want. It contains a geojson file of Iran states boundaries downloaded from [www.Mapzen.com]

You can also see the map and the points graphically by using *[QGIS]. Note: QGIS is an official project of the Open Source Geospatial Foundation (OSGeo). It runs on Linux, Unix, Mac OSX, Windows and Android and supports numerous vector, raster, and database formats and functionalities.

Prerequisites

- Python 2.7
- python-pip 
- python-geojson
- python-gdal

Quick Start

This guide is based on Python 2.7 on a Windows 32/64bit:

Step 1:

Install Python 2.7 with the default options and directories.

Step 2:

Download get-pip and run it through this command in command prompt Goto the directory that contains get-pip.py using cd commmand then type: 'python get-pip.py'

Step 3:

Installing GDAL

Now this is gonna be a little tricky. Follow the exact structions.

  • Download the appropriate [GDAL Binary]. After downloading install GDAL with standard settings.
  • Download [Python Bindings] for GDAL binaries and install them.
  • Recall that we had installed Python 2.7 earlier.

Step 4:

We need to tell Windows system where the GDAL installations are located, so we need to add some system variables.

  1. Right click on "Computer" on the desktop and go to "Properties"
  2. Click on Advanced System Properties
  3. Select Environment Variables.
  4. Under the System variables panel, find the ‘Path’ variable, then click on Edit.
  5. Go to the end of the box and copy and paste the following:
  • ;C:\Program Files (x86)\GDAL
  • Note: For 64-bit GDAL installations you would simply remove the (x86) after "Program Files" every time.
  1. In the same System variables pane, click on “New” and then add the following in the dialogue box:
  • Variable name: GDAL_DATA
  • Variable value: C:\Program Files (x86)\GDAL\gdal-data
  1. Click “OK”
  2. Add one more new variable by clicking “New…”
  3. Add the following in the dialogue box:
  • Variable name: GDAL_DRIVER_PATH
  • Variable value: C:\Program Files (x86)\GDAL\gdalplugins
  1. Click “OK”

Testing the GDAL installation:

  1. Open the Windows command line, by going to the Start Menu -> Run ->Type in cmd and press Enter.
  2. Type in gdalinfo –version
  3. Press Enter.
  4. If you get the following result, then congratulations your GDAL installation worked smoothly!
  • GDAL 1.11.1, released 2014/09/24

Step 5:

Install these two packages using pip command also in cmd by typing:

pip install geojson
pip install gdal ( Just for sure )

Congratulation

Your Python Script is ready to use.

With special thanks to:

[Sepehrnoush] , [xunilk] [xunilk]: http://gis.stackexchange.com/users/45066/xunilk [Sepehrnoush]: https://github.com/sepehrnoush Source :

iran-geojson-map-boundaries's People

Contributors

ssepehrnoush avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.