Skip to content

ronnywang/geojson2image

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

GeoJSON to Image

This is a PHP class for generate Image from GeoJSON.

How to use

include(__DIR__ . '/GeoJSON2Image.php');
$max_size = 1000;
$ret = GeoJSON2Image::json2image($json, $max_size);
$ret->image;   // GD Image object
$ret->boundry; // array(min_x, max_x, min_y, max_y) boundry

Files

  • GeoJSON2Image.php: main class
  • geojson2png: generate png from geojson file
  • TaiwanCounty.json: Taiwan County GeoJSON sample
  • TaiwanCounty.png: Taiwan County output (command: ./geojson2png TaiwanCounty.json; mv output.png TaiwanCounty.png )

About

GeoJSON to Image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages