File format
Alpana supports a map format called GeoJSON
This is a structured text format similar to Javascript Objects and can be edited with any text editor.
Geographic or X-Y
The shapes represented by Alpana maps can be :
- geographic : coordinates are longitudes/latitudes and a Mercator projection is applied
- normal : coordinates are X/Y and are considered as on a flat surface
Features
The GeoJSON format allows to define shapes as “Features” (mostly polygons) which Alpana can draw in Widgets as vector graphics very efficiently.
GeoJSON “Features” supported by Alpana are :
- Polygon : any set of points define a closed shape as a polygon
- MultiPolygon : any set of polygons can be grouped into a single shape (example : the British Isles may be considered a single shape made of several separate polygons)
- Point : a single point can also be represented (point of interest, city, etc)
Properties
Each Feature can possess a set of Properties which can contain any metadata.
These Properties allow map makers to give unique names to each shape, and will allow Alpana to bind dashboard data to each shape depending on its name (“to each Feature depending on its Property”).
These Properties are a dictionary of key-value pairs.
Finding or Creating new Maps
Editing
Some GeoJSON files can be easily edited by hand using a text editor (Notepad), especially for modifying Properties.
This can be made easier using a text editor with syntax highlighting for Javascript (or JSON) like Visual Studio or Notepad++.
Some easy-to-use graphical tools exist, including free web-based tools like http://geojson.io/
Creating
Creating maps from scratch is more difficult when using only a text editor.
One option is to use a graphical tool like http://geojson.io/
Another option is to generate the GeoJSON Features programatically (using Excel for example) by concatenating JSON strings and actual coordinates.
Finding GeoJSON Maps
It’s easy to find existing GeoJSON maps with relatively open licenses on the web.
Usually just type the name of your region + “geojson”, and you should find many results.
GeoJSON file example
This is an extract of a world map geojson file :
All properties can be used to link your data from your datasource.
The whole file can be downloaded here : Link text
Post your comment on this topic.