An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

2
votes
0answers
28 views

ogr2ogr does NOT save “styles”, say “color”, information; how do I get around it?

I'm using ogr2ogr to convert KML to GeoJSON and I'd like to extract style information along with the data. The bash script I am using is: filekml="/tmp/poly.kml" filegeojson="/tmp/poly.geojson" ...
3
votes
1answer
2k views

How do you put GeoJSON attribute information in a popup with OpenLayers

I am having some trouble putting GeoJSON attribute information in a pop-up. The selection control is working, and I create an alert (for testing) and this is working. But I can't figure out how you ...
1
vote
1answer
25 views

Is there a way to have a choropleth map in Excel reading data from a sheet?

Is it possible to have a solution similar to ESRI maps for office in which I want basically a geojson file or any file for that matters to render a choropleth map based on data in a sheet? Tried ...
2
votes
1answer
31 views

GeoJSON and HTML/JavaScript vs Shapefile and Silverlight

I'm developing a map application (Several shapefiles with OpenstreetMap or BingMap on background and some dynamically generated features on the map). I'vs created some part of it with Telerik RadMap ...
0
votes
1answer
31 views

Displaying geojson data in leaflet

I am trying to access and display some data in a geojson layer and would appreciate if someone can take a look at my code below and suggest what I need to do to make it work. The result of the ...
1
vote
1answer
9 views

URL for my Protocol.HTTP never called by OpenLayers?

I have an OpenStreetMap (OSM) map with a vector layer fetching data from a Node.js server setup on my local machine on port 9000. The data is in GeoJSON format. Here is the whole code: var ...
2
votes
2answers
144 views

json to xml transformation with x2js

I am trying to transform a JSON object to XML, but i have somehow get stuck in jscript (not an expert). Here is the code: ... var GEOJSON_PARSER = new OpenLayers.Format.GeoJSON(); var ...
0
votes
0answers
16 views

GeoJSON of half the earth [duplicate]

I'm currently trying to model daytime/nighttime in leaflet, and the only way I currently see me being able to do that is to have a GeoJSON polygon reflecting half of the earth (for daytime/nighttime ...
3
votes
1answer
23 views

Lambert_Conformal_Conic: converting from shapefile to geojson fails

I have a shapefile that also contains a proj file that looks like so: PROJCS [ "MGI_Austria_Lambert", GEOGCS [ "GCS_MGI", DATUM [ "D_MGI", ...
1
vote
2answers
41 views

Row-crop field boundaries

I'm on the hunt for field boundary coordinates in the US in the form of GeoJSON, a Shapefile or any structured format that I can use to overlay on a map. I've tried looking at the US Department of ...
2
votes
1answer
158 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
1
vote
2answers
155 views

Printing possible for openlayers GeoJson WFS with Mapfish printing service and wkhtmltopdf?

I searched lots of places but I couldn't find proper examples or documentation to do printing using Mapfish Printing service or Wkhtmltopdf. My application has a few WFS layers from openlayers and ...
5
votes
2answers
108 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 ...
0
votes
1answer
212 views

Issue with a point insertion into a Geoserver points layer. WFS-T

How is the best way to insert a feature from the client side into an existing GeoServer layer? Maybe using an ajax call and JSONP? Or OpenLayers (i can't figure out how to have the proxy working)? ...
2
votes
1answer
129 views

Natural Earth: How to get the position of all provinces that belong to a state

This question is about Natural earth 1:10 states and provinces.shp file. I'm using ogr2ogr and want to know the name of the id i need to pass . In purpose of pulling out the right states regions. ...
3
votes
3answers
231 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 ...
1
vote
1answer
23 views

Convert WKT (or geojson) geometry to numpy array of coordinates

I am looking for the fastest way to convert WKT or geojson geometry from string to numpy array of coordinates. Is it possible to do it strictly in Python and without creating geometry object such ...
2
votes
0answers
19 views

Stray horizontal lines after converting from GeoJSON to topojson

After converting a GeoJSON file to topojson, and loading the topojson into Leaflet, stray lines appear in the resulting map. Like this: What is causing this? If I view the GeoJSON, these stray ...
4
votes
1answer
30 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 && ...
2
votes
1answer
25 views

Geoserver WFS - Can I Pass in Filter Parameters via the URL?

I'm trying to use PHP's CURL function to fetch geoJSON information from a GeoServer instance. I'm doing this using url variables rather than trying to construct a full xml GetFeature request. ...
1
vote
2answers
23 views

Converting Shapefile data to GeoJSON

I have access to some open data for which I want to obtain some coordinates to put onto a map. Unfortunately, the data is in the Shapefile format which is rather difficult to work with. I am trying to ...
1
vote
1answer
18 views

Error inserting GeoJSON in PostGIS

I know there is a similar question but I am getting a different error and none of those answers have helped. I am trying the following query (the GeoJSON itself is from the PostGIS website. INSERT ...
1
vote
1answer
29 views

Unable to save to in Geojson format with the correct projection

I have a shape file (Polygon) in Qgis that I wish to save in Geojson in order to display it with the mapbox javascript api. Original projection is in POSGAR 97 My issue is that it does not reproject ...
1
vote
0answers
23 views

What is wrong with my data receiving from php script for geoJSON TileLayer?

I want to get geo data as geojson for geojson tile layer requests in leaflet. I set up a geojson layer like this: https://github.com/glenrobertson/leaflet-tilelayer-geojson/ A php script answers ...
0
votes
1answer
140 views

How to generate random GeoJSON polygons (latitude, longitude)

I am looking how to generate polygons in GeoJSON format with random locations (latitude, longitude), if I generate totally random set of points it will not produce valid polygons. So my question is ...
4
votes
2answers
165 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 ...
2
votes
1answer
29 views

Add GEOJSON layer in tilemill EACCES symlink Error

I'm trying to add a GEOJSON layer to Tilemill [ Version 0.10.2 (v0.10.1-293-g697c86c) ], installed on ubuntu 14.04. I've confirmed that the ID used is unique and attempted to load the file into my ...
0
votes
2answers
291 views

PHP PostGIS to geoJSON missing required parametar error

I'm using this PHP PostGIS to geoJSON script: https://gist.github.com/bmcbride/1913855 But I keep getting this error: 'missing required parameter: geotable' This is my code: # Retrive URL ...
1
vote
1answer
23 views

Query and Visualize GeoJSON data [closed]

I am trying to visualize specific GeoJSON data. I am successfully loading the full GeoJSON file (Multipolygon) using Leaflet JS. Is there any query to find specific polygon from that GeoJSON file? ...
2
votes
1answer
211 views

Large loads geojson from mysql to leaflet?

I have a mysql database with +25K rows including geometry and other attributes. Using a mysql2geojson php script I then added it to a leaflet map. It is super slow now, what can I do to boost the ...
1
vote
1answer
105 views

Simplifying Shapefile without risking Spatial Accuracy?

I am building a feature for a web application. Basically would use the ABS (Australian Business Statistics) data to render the regions on the Google Maps. I am able to implement the basic working ...
1
vote
0answers
24 views

how manage mysql spatial polygons in parent child style

I want to store location-polygon data in a parent-child relation. I am using spatial data in MySQL and Google map for polygon. Eg: World 1.1 US 1.2 China 1.3 Japan 1.4 South Africa 1.4.1 Pretoria ...
2
votes
0answers
28 views

loading geojson in leaflet

I just added the geoJSON vector layer in leaflet for my hybrid mobile app using phonegap, the problem is that when I add the geoJSON file of size larger than 2mb the application crashes. What is the ...
1
vote
0answers
27 views

Adding marker on a leaflet map

I'm very new to GIS and for learning I started with building a simple web app with GeoDjango. I am using dango-leaflet. Since I have a very limited knowledge I am facing many challenges. I'm trying to ...
1
vote
0answers
16 views

Openlayers external GeoJSON error handling

I'm making a map which refreshes itself in a given interval and shows the progress of objects on a vector layer with information from an external GeoJSON file. When the server is not accessible, or I ...
0
votes
0answers
20 views

Formating geojson file with leaflet ajax-plugin

First of all I apologize for my basic english. I have to say, too, that I'm really a newby in coding. I'm trying to create an interactive map using leaflet (you can see it here). I was able to show my ...
1
vote
1answer
214 views

How to write GML and GeoJSON features while retaining attributes in .NET?

I am developing a .NET project [C#] that needs to export/write features as GML and GeoJSON, including, of course, the attributes; data could queried by a database or manually entered. I checked ...
3
votes
2answers
54 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: ...
3
votes
2answers
439 views

Offline Phonegap/Openlayers App

I have a mobile app that uses Phonegap with OpenLayers and Geoserver. Now, I need to make the app available completely offline. The amount of data points can get very large depending on what client is ...
2
votes
0answers
30 views

How can I merge adjacent polygons and return all (adjacent and not adjacent) as Multipolygon?

I have a postgres database with administrative boundaries and their geometry. Each of those boundaries have an ident number. What I want to achieve: First I want to select all rows which are ...
2
votes
1answer
32 views

Access to custom GeoJSON members in OpenLayers

I need to read a layer-wide attribute, from a GeoJSON file, set by a custom member to the object: {"type": "FeatureCollection", "features": [...], "search_polygon": "POLYGON (...)"} Since it seems ...
1
vote
1answer
286 views

How to export a geojson file with correct order of coordinates?

I was testing rendering of data via GitHub in geojson format, because I wanted to use it for INSPIRE data. INSPIRE data are in GML 3.2.1 format. I've downloaded one of datasets from ...
2
votes
1answer
231 views

leaflet geojson contextmenu

I want to add a context menu on right click for various elements on my geojson layer (I'm doing a road map so on a right click on the road at any part I want to show the context menu). I've managed ...
0
votes
0answers
19 views

GeoJson layers with leaflet in IE8

I have built a website displaying a lot of line shapes, using geojson, on a leaflet map. This is working relatively well in most browsers, though speed could be improved. As usual IE8 is being the ...
1
vote
2answers
314 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
2
votes
1answer
20 views

Figuring out what coordinates supposedly using 'NAD31 projection' refer to

I'm working with a GeoJSON file that contains sets of coordinates associated with street corners in the city of Montreal, Canada. The spec sheet of the API delivering those GeoJSON specifies that the ...
-1
votes
1answer
47 views

What is the best conversion tools?

I need to obtain a lot of base map in the following formats from a PostgreSQL DB: *.shp *.tab *.js (GEOJSON) I know that ogr2ogr is able to obtain these formats type. Do you know of other tools ...
0
votes
1answer
96 views

ogr2ogr GeoJSON GeometryCollection

All, I have a Postgres/PostGIS DB with two geometries in a single table. I want to export them as a GeoJSON GeometryCollection (see here) but I can't seem to get the GEOMETRY_AS_COLLECTION layer ...
5
votes
1answer
440 views

Generate tiles for google maps overlays

I am trying to show some information on Google Maps which would be in the form of translucent circle overlays. The problem is that some circles overlap, which results in increased opacity and blending ...
5
votes
3answers
708 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 ...