Skip to content

chk1/geojson2png

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert GeoJSON to image

Usage:

npm install
node example1.js
node example2.js

Example 1

Source data: countries.geojson from here

Converts the JSON file into XML intermediately and then renders it without any style information, uses the geojson-mapnikify defaults which are specified in geojson-mapnikify/lib/defaults.js.

Output:

countries.geojson rendered 1

Example 2

Source data: Same as above

Loads a stylesheet XML countries-stylesheet.xml file, which then fetches its data from the same countries.geojson. Specifies some filters, styling rules and the projection.

Output:

countries.geojson rendered with stylesheet

About

GeoJSON to PNG example with Mapnik and NodeJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published