An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

5
votes
1answer
128 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
4k views

setStyle() function for GeoJSON features - Leaflet

Ok, since I already asked a very long question about this, but since it didn't get any new replies for a while, and not to get confused in details, I will keep this one simple the best way I can. If ...
5
votes
1answer
835 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
339 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
752 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
2k 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
2answers
181 views

Leaflet: How to enable pan & zoom while GeoJSON still rendering?

I've overlaid a huge GeoJSON geometry on top of my Leaflet map, covering about 20 countries' borderlines (about 1,5 million vertices) using "L.geoJson". Each time I zoom in/out, the computer has to ...
5
votes
1answer
3k views

Auto zoom on multipolygon with leaflet

I have a geojson with a multipolygon and I want to fit this multipolygon to the map. The map center only on one polygon not on the multipolygon. Here is my script var map = L.map('map',{ ...
5
votes
1answer
3k views

problem adding pop-up to GeoJSON layer in Leaflet

I'm new to working with the Leaflet API and am running into trouble with creating popups for a GeoJSON layer. I've looked at the following post as a reference and am still having difficulty: binding ...
5
votes
1answer
710 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
843 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 ...
5
votes
0answers
138 views

How to add an attribution on a GeoJSON Layer from Leaflet?

I need to use a GeoJSON Layer on my Leaflet map. Here is a sample of my code: function onEachFeature(feature, layer) { if (feature.properties && feature.properties.popupContent) { ...
4
votes
2answers
1k views

How to merge TopoJSON features?

I currently have a coordinate based map of the US and it's states for topojson (https://github.com/mbostock/topojson). The coordinates are a JSON array (as topojson works), data looks like this: ...
4
votes
1answer
474 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
1answer
2k 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
3k 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"); // ...
4
votes
2answers
422 views

Where can I find GeoJSON resources files?

I'm looking for demographic information and various things, and most of the time data are available as CSV (my application use geoJSON format). Shall I encode the CSV to geoJSON or is there a ...
4
votes
2answers
1k views

Beginner needs suggestions on map clicks and geojson

I'm a beginner with programming, and javascript. I went to the FOSS4G-NA conference and was very inspired to learn more. I'm trying to learn PostGIS, and have come across a very useful tutorial for ...
4
votes
1answer
2k views

What's up with the GeoJSON spec and CRS as a IRM?

I'm writing a web API to our GIS data, currently revamping our geocoding service. I'm creating the option for folks to specify the output type as GeoJSON so I'm trying to follow the spec. Our data is ...
4
votes
2answers
560 views

How to generate one geojson file from several rows in Postgres/PostGIS?

I have a table with geospatial objects, in particular, polygons. I know that I can generate from one row a geoJSON string using ST_AsGeoJSON(http://www.postgis.org/docs/ST_AsGeoJSON.html). But I would ...
4
votes
2answers
1k views

GeoJSON/GeoCouch questions from a newb [duplicate]

I am new to JSON and GeoJSON and would like to start to use this but I am a little confused about some things. Perhaps you can help me out: 1) Is there a GeoJSON validator out there? 2) Is the text ...
4
votes
2answers
45 views

Access geojson from github in leaflet

I am new to json, github, and leaflet. But I am trying to create a simple application which will render my points which are in geojson up on github. From everything I have read this should work. ...
4
votes
3answers
112 views

Adding Properties to GeoJSON File

I have a GeoJSON file of the country of Haiti with the administrative boundaries for communes (i.e. counties). Here is the file: ...
4
votes
2answers
421 views

How to remove redundant points

We basically have points table including vehicle routes.In huge traffic conditions,devices collecting data on route may output redundant points where at any coordinate same points may repeat.We can ...
4
votes
2answers
1k views

Using QGIS, how can I add a bounding box attribute?

I have a shapefile where I am exporting the features to GeoJSON objects with ogr2ogr based on a simple where clause. One thing that I would like to be included in the GeoJSON object is the 'bbox' ...
4
votes
1answer
101 views

Leaflet: how to change default style on a point GeoJSON Layer?

I need to change style on a point GeoJSON layer in a Leaflet map. I'm using the following code: function onEachFeature(feature, layer) { if (feature.properties && ...
4
votes
2answers
339 views

get map tiles for a polygon

Based on this tutorial, I can easily find out a tile for a point. But is there an algorithm to find all tiles that are covered by a rectangle or lineString or by any other feature? I would greatly ...
4
votes
1answer
237 views

Leaflet - Change style on click

I am beginer with Leaflet library and I am facing an issue with a geojson. I have an extern geojson file (points) and I would like to display a circle for each point coordinates and get a bigger ...
4
votes
1answer
569 views

Is it valid to have a properties element in an geoJSON featureCollection?

Is it valid to have a properties element with a featureCollection-element as parent? This is, according to geojson.org valid: { "type": "FeatureCollection", "features": [ { "type": ...
4
votes
2answers
921 views

Convert Sql Server Spatial data to GeoJSON & plot on map

I have a sql server table with Geo spatial data. An example of row would be (with Column names): type: streetline code: 231001 geog: 0xE6100000011 ........ Centroid 0xE61000000C....... geom: ...
4
votes
1answer
554 views

Geotools: Efficiently writing a GeoJSON stream into a Shapefile

I've been trying a few solutions to efficiently convert GeoJSON into a shapefile without having to store all features in memory. I'm using GeoTools 9.2. The problem is not so much in how to stream ...
4
votes
2answers
689 views

binding nested arrays as geojson popups in leaflet

I am struggling with geojson popups in leaflet.js I have nested arrays as properties for my features - an example would be counts of fish caught at a location (not my actual project data!) ...
4
votes
1answer
2k views

How to add a geoJSON layer to leaflet map?

i am newbie in leaflet & its geojson features... I am trying to test leaflet's functionalities. In fact i have built a map and its layer: var map = new L.map('map', {scrollWheelZoom:true, ...
4
votes
1answer
822 views

Why are GeoJSON coordinates different exported from QGIS vs. ogr2ogr?

I have a shapefile with a Google Mercator projection (900913) that I need converted to GeoJSON. I need to do this on a regular basis amongst other things so I wrote a shell script to do it using ...
3
votes
4answers
638 views

Can ArcPy's AsShape be used with GeoJSON FeatureCollection of Polygons with Labels?

The AsShape documentation provides examples that work very well. However, I have been given what I believe to be valid GeoJSON that is a FeatureCollection of two polygons each with a Label. It ...
3
votes
2answers
2k views

Convert GML to GeoJSON

I have downloaded a GML file from Statistics Canada and would like to convert it into GeoJSON to use parts of it in a D3 visualization on the web. However, I did not find a converter that would do ...
3
votes
2answers
2k views

Is there any efficient way to convert Geojson to WKT?

I want to use ST_GeomFromText() to load vector data to PostGIS. However, I don't know how to convert from Geojson type to WKT. N.B. I know I can use OGR2OGR to upload the geojson directly, but I just ...
3
votes
2answers
118 views

How to determine number of features in GeoJSON file using Python or JavaScript?

Is there a best way to determine the number of features in a GeoJSON file? Ideally using Python or JavaScript.
3
votes
2answers
541 views

Problem with loading GeoJSON file in OpenLayers generated by PHP

I'm trying to read some geo-data from PostGIS database using PHP, creating a GeoJSON file and showing it on a base map using OpenLayers. The PHP code works just fine. The generated data in GeoJSON ...
3
votes
3answers
426 views

Is it possible to check incoming GeoJSON to see if any of the features are identical to existing ones before adding to map?

I am working on a Rails/PostGIS app and doing a typical ajax call to retrieve GeoJSON within the map viewport bounds. Whenever the map is shifted or zoomed all of the markers are removed and then ...
3
votes
3answers
1k views

How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

I try to use the following function to add polygons to my Leaflet map. function polygon(geojson) { alert(geojson); // alert for testing layer = L.geoJson(geojson); layer.addTo(map); } ...
3
votes
2answers
574 views

GeoJSON formatting for Leaflet

I am using http://GeoJSON.io as the source for my data, which is then to be displayed via Leaflet.js. I found that leaflet neads the file to include "var name = {" but GeoJSON.io doesn't like it, ...
3
votes
4answers
1k views

Display GeoJSON layer on top a SVG image instead of a map.

I'm very new to GIS, so hope this is the correct place to ask. Not sure if this will even be possible. This is what I want to achieve: In short, I want to display a set of polygons, lines etc. in a ...
3
votes
1answer
810 views

How to avoid corrupt geometries when translating between TopoJSON and GeoJSON?

I'm trying to display some geojson vector features on a leaflet map. The size of my GeoJSON is too big (25.4mb of data, 8.47mb gzipped), so I'm trying to use a TopoJSON format to reduce the size ...
3
votes
3answers
1k views

Definitions and limitations of MapInfo TAB file objects

I am working on a MapInfo plugin to convert MapInfo files to GeoJSON files. I am having trouble matching up the object types of the two formats. Each GeoJSON object type is described in the ...
3
votes
1answer
238 views

Serialize python list containing geometry

In simple case if list doesn't contains geometry all works fine: result = [dict(f.fields, id=f.id, label=f.label) for f in features] json.dumps(result) But if result list contains geometry ...
3
votes
1answer
1k views

My GeoJson will not display on a Vector Layer in Openlayers

I have geoJson from the the USGS that I am downloading to my server. It validates just fine with geojsonlint. When I past the JSON into this Openlayers example it says it is bad input json. My Code ...
3
votes
3answers
674 views

How to properly convert landmass NaturalEarth data into GeoJSON?

100% Newbie. I've been following Mike's d3 Map Tutorial and I've come up against a challenge. I guess my question essentially boils down to: how does one generate the proper GeoJSON/TopoJSON files ...
3
votes
1answer
484 views

What is generally faster in OpenLayers: WMS or GeoJSON?

I work both with WMS (connection with postgres) and GeoJSON in OpenLayers. I have the impression that a WMS is faster when more feature need to be loaded. And I have the impression that GeoJSON is ...
3
votes
1answer
3k views

Parsing a GeoJSON file with jQuery

I'm trying to iterate through a GeoJSON file (below) and eventually populate an array with a few attributes within "properties". I keep coming up short working through various examples I can find. Do ...