An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

22
votes
1answer
3k views

Convert GeoJSON to TopoJSON

Question How do you convert GeoJSON data to TopoJSON? Why Topojson files are often smaller than geojson and the conversion allows you to incrementally simplify a dataset, if you wish.
18
votes
3answers
4k views

How to store lines and polygons in JSON documents?

Looking at the increasing NoSQL movement and considering that databases like MongoDB offers a new perspective in flexible data storage for GIS. What is the best way to store lines and polygons in ...
13
votes
3answers
3k views

Converting SimpleGeo Places GeoJSON file to shapefile?

SimpleGeo has recently made their "Places" data set freely available which is GREAT, because now we can use it for our own purposes, even offline. So I went about downloading the 2GB dataset, which ...
12
votes
4answers
5k views

Create Vector Tiles for Polymaps

Ok, likely my bad for not making it to WhereCamp5280 and asking the FortiusOne geeks directly, but what's the process for creating GeoJSON 'tiles' for use in Polymaps? The Population example over at ...
11
votes
7answers
6k views

How to convert ArcGIS Server JSON to GeoJSON?

I'm creating a web map using Leaflet, and I want to be able to grab feature layers from our ArcServer. I have successfully been able to retrieve a feature class as JSON, but Esri's JSON objects don't ...
11
votes
2answers
474 views

What is topojson and how is it different than geojson?

This is a conceptual question. What are the differences between these? and what are the pros and cons of these formats?
11
votes
2answers
5k views

ogr2ogr converting to shapefile - how to select feature types?

Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types. When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
10
votes
3answers
4k views

How to create a GeoJSON that works with D3?

I'm simply trying to convert a .shp file to a geoJSON format using: ogr2ogr -f geoJSON output.json input.shp After executing the command nothing seems to be wrong. Here's an excerpt from the ...
10
votes
5answers
2k views

How do you convert OSM XML to geojson?

I want to take the XML output of a Xapi query and display it using leaflet or polymaps. How can I do that? Is there an easy way to convert XML to geojson
10
votes
2answers
2k views

How to Export Feature GeoJSON from PostGIS

I'd like to do a GeoJSON dump of a PostGIS table, but I want to export features (the geometry and the properties) not just the geometry. I've been digging into the ST_AsGeoJSON function but it looks ...
10
votes
2answers
1k views

polymaps & poly… polygons

I've been playing with Bing Maps + Polymaps recently. It has become apparent that Bing is the only mapping resource available to Polymaps that includes satellite imagery. Is this true? I am trying ...
10
votes
2answers
3k views

How do dissolve polygons from shapefile using open source tools?

In my current project I'm visualizing data on a map representing some values for each administrative areas of a country. I'm given a shapefile of this country, which I'm converting to GeoJSON for use ...
9
votes
4answers
1k views

Alternatives to ogr2ogr for loading large GeoJson file(s) to PostGIS

I have a 7GB GeoJson file that I would like to load into a PostGIS database. I have tried using ogr2ogr but it fails because the file is too big for ogr2ogr to load into memory and then process. ...
9
votes
5answers
1k views

GML, KML, GeoJSON - Speed rendering 3109 polygons?

I am working with Geoserver, serving U.S. Lower 48 counties to openlayers (3109 polygons - lots more vertices). The counties are loaded into a postgis database. I am curious about developer ...
8
votes
3answers
2k views

How to Validate a GeoJSON

I have a small script that I'm using to generate GeoJSON data from a data format not currently supported by GIS software. I would like to validate the output, but when I use ogr2ogr to read it, it ...
8
votes
6answers
3k views

Is there an existing library for converting ArcGIS Features to Json?

Is there an existing library for converting ArcGIS IFeature types to and from Json/GeoJson?
8
votes
2answers
677 views

How to reduce the file size of GeoJSON data?

For my project I am trying to convert the tiger shapefile information for us states into GeoJSON format However when I use the ogr2ogr tool the data file is about 20 MB. I have seen the geoJSON file ...
8
votes
3answers
2k views

GeoJSON Styling information

As far as I can see there is nothing in the GeoJSON standard to store styling information, i.e. line colours, thicknesses etc. Am I missing something or is this just something that GeoJSON doesn't ...
8
votes
2answers
755 views

Future for geospatial on App Engine?

2 years ago, this question was posted here at Gillies's blog, on date of 2009-05-15. Future for geospatial on App Engine? At that time there was no news relating to any apps of GIS web services ...
8
votes
1answer
874 views

arcpy.geometry __geo_interface__ and AsShape() function: loss of precision and holes

I'm serializing my arcpy geometries as geojson so that I can 'hydrate' them back as geometries later and I'm having 2 problems in the cycle.: PROBLEM 1: Precision R0 = ...
8
votes
1answer
585 views

GeoJson to ESRI Shapefile using ogr2ogr

I have a GeoJson file that I want to convert to ESRI Shapefile using ogr2ogr in FWTools. I tried using ogr2ogr -F "ESRI Shapefile" filename.shp geojsonfile.json OGRGeoJSON I got output ERROR ...
8
votes
1answer
2k views

Setting up TileStache

I want to set up TileStache, but I'm new enough to the world of GIS to find the TileStache docs a bit impenetrable. I've just about figured out that I need to run tilestache-server.py -c ...
7
votes
2answers
2k views

Generating GeoJSON with Python

Hi I want to programatically create a GeoJSON file using polygons from a shapefile but adding attributes from my own application. This is easily done for a shapefile: def ...
7
votes
4answers
1k views

GeoJSON too bulky - what to do?

I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using ...
7
votes
1answer
2k views

How to display geoJSON from an URL in a layer?

I am looking for some type of plugin or code which would allow me to add a geojson URL, define the areas to input the lat/long variables from the visible Qgis canvas map and call/render the results ...
7
votes
4answers
5k views

Source for GeoJSON data for the US

Does anyone know of any good sources for US data (counties, congressional districts, etc) in GeoJSON format? Has anyone converted public-domain shapefiles/sources to GeoJSON that they would be willing ...
7
votes
2answers
706 views

Converting KML files for use with Python library Shapely

I am trying to get a KML-file (wijken.kml) into Shapely. The KML-file is validated against the proper XML schema, so I guess the input is correct. Routes I have tried: 1) Converting to WKT or WKB ...
7
votes
3answers
2k views

Trying to find a .NET GeoJSON library

I'm trying to find a .NET GeoJSON library which I can use to export my SqlServer2008 spatial boundaries (in binary format -> eg. STAsBinary()) from my .NET code to my HTML frontend to display on a ...
6
votes
3answers
2k views

How to insert a GeoJSON polygon into a PostGIS table?

I need to insert a polygon from GeoJSON to my PostGIS table. This is how the SQL query looks like. INSERT INTO tablename (name, polygon) VALUES ( 'Name', ST_GeomFromGeoJSON ( { ...
6
votes
1answer
3k views

Open a GeoJSON file with QGis

If I have a GEOJson file, for example a file named test.js with inside the following: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": ...
6
votes
1answer
2k views

What is the default projection in Leaflet?

I've read an API documentation for Leaflet on its site, but I can't realize: what is a default projection to view maps? It was written about spherical and elliptical Mercator and Equirectangular - so ...
6
votes
2answers
1k views

Converting MapInfo TAB to GeoJSON

Is there an easy way to convert MapInfo TAB files into GeoJSON? I am working on a web-based mapping system which will use GeoJSON to transfer data. I also use MapInfo and would like to be able to ...
6
votes
3answers
309 views

What is the intended Behavior of -skipfailures in ogr2ogr?

I am trying to run ogr2ogr to convert some geojson to shapefile. All is good until any of the geojson features have an invalid geometry (for example, the coordinate array of point geometry is empty). ...
6
votes
2answers
736 views

Generating GeoJSON tiles from GeoDjango - basic overview?

I'm working with the glorious PolyMaps and I want to build a map similar to the population example. I understand that this needs GeoJSON tiles. I have a GeoDjango database, with a bunch of County ...
6
votes
1answer
177 views

How do I represent the whole Earth as a Polygon?

This is related to determining the interior of a Polygon. My difficulty is that if I specify a Polygon covering the Earth going from East to West, it will still have a boundary along the ...
5
votes
2answers
212 views

Can we merge shapefiles with different geometries (point and polygon) to get a single layer which shows both geometries?

I want to merge two shape files in which one is of point geometry type and other is polygon type in order to get a single layer containing both points and polygon in a single map.
5
votes
1answer
77 views

Is there a free dataset of historical geocoordinates of ancient cities and places?

Is there a freely available dataset (csv, geojson, topojson, etc.) with geocoordinates of ancient cities, for example of the Roman Empire? Ideally with additional information like population size? ...
5
votes
1answer
164 views

Python3 libraries for GIS analysis

I am trying to do some spatial data analysis in Python 3 now, and I was wondering what the best libraries are for GIS in Python 3. The Fiona library was developed with Python 3.3 but the Python 3+ ...
5
votes
1answer
555 views

Real time positioning of vector features using database

I am a newbie in GIS and want to implement something like a vehicle tracker wherein I will get a series of coordinates in a database. I have no idea how to go about it, I mean what should my process ...
5
votes
2answers
307 views

How can I setup a simple web mapping system?

I'm new to mapping and GIS and I'd like to setup a mapping system to display informations on a map, I think the following could work but I'm not sure how good it is.. 1- I store my data (lat, lng ...
5
votes
2answers
345 views

OGR merge shapefiles of different geom type into a single GeoJSON feature collection

I'd like to merge shapefiles of different geometry types into a single geojson feature collection, but OGR says it doesn't support update of GeoJSON files: $ ogr2ogr -f GeoJSON -t_srs crs:84 -lco ...
5
votes
2answers
1k views

Create multiple vector layers by reading a GeoJSON file once in OpenLayers

I am a begginner to OpenLayers, and my question is about making things more efficient. My work is about displaying time-dependent weather elements on several point locations on the map. All these ...
5
votes
1answer
138 views

Representing a TIN in GeoJSON

Regarding the GeoJSON representation of a TIN, are there any specifications or existing implementations I may not be aware of? You could probably hack one together using the multipolygon ...
5
votes
1answer
515 views

Exporting Arcgis Online content as georss or geojson? [duplicate]

There are number of sites talking about how to add a georss feed to an ArcGIS Online map (see silverlight and flex examples from esri_webapi), but I haven't located anything about exporting a georss ...
5
votes
1answer
671 views

Working examples of Leaflet/Polymaps with GeoJSON tiles generated from Tilestache using Shapefiles?

I'm looking to create choropleths using GeoJSON tiles generated from ESRI Shapefiles by TileStache(or similar), in either Leaflet or Polymaps. So far reading and drawing GeoJSON from both Leaflet and ...
4
votes
3answers
320 views

Advantages of WFS over GeoJSON/KML?

I'm planning to create an online map with openlayers (2 or 3) or leaflet. I have to show some points/markers (~30.000), polygons (~500) and lines on top of an OSM map in several layers. Those points ...
4
votes
1answer
408 views

Is there an XML equivalent to GeoJSON?

In my web application, I am retrieving geospatial data from a server backend (Java) to the browser frontend (JavaScript). I am considering two options of how to serialize the data in this ...
4
votes
2answers
291 views

How to convert geoJSON to python objects?

New to the site, and to geoJSON, and to python. My goal is to read in a file with geoJSON data, and use it to generate shapes to be used in an application that is using python scripting. Python has ...
4
votes
1answer
983 views

leaflet geojson coordinate problem

I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on. My coordinates are: 52.23943, 4.97599. They work correct with ...
4
votes
3answers
2k views

MySQL to GeoJSON - Formatting Issue

I'm trying to make a select on a mysql table and then write it out to a geojson file. I'm getting close but there are a few issues. Here's what I have so far: <?php require("dbinfo.php"); // ...