Tagged Questions

An open geographic data format based off of JavaScript Object Notation

learn more… | top users | synonyms

1
vote
1answer
23 views

How to cast data types from GeoJSON feed (aka: how to sync when everything is a string)?

Just getting started with the CartoDB Way and have run up against first problem. Looks like I'm not alone. We have a GeoJSON feed coming from a Fulcrum data collection app. We want to see current ...
1
vote
1answer
60 views

Java library for reading geojson from MySQL

I am looking for a way to retrieve mysql geometry data as geojson from the database either using a java library or for converting wkt to geojson using either java or javascript. Currently I am doing ...
1
vote
0answers
41 views

export map state as JSON: Web_Map_as_JSON

Is there a way to export the current map state as a JSON object, mostly named Web_Map_as_JSON. The JSON specification should be like this. In other words, it would be convenient to have a function ...
0
votes
2answers
90 views

How do you load a GeoJSON file in Leaflet?

I'm stumped as to how to add a GeoJSON layer to an OSM map. Through Google, I've found a bunch of different answers, none of which seem to work. Following the Leaflet documentation, the simplest way ...
1
vote
1answer
277 views

Custom marker/icon based on attribute data in leaflet/geojson

I would like to add different icons to my leaflet map based on attribute data. My layer is a geojson layer, it is coming from geoserver with jsnop. I can see my data with the default marker, but when ...
2
votes
0answers
235 views

How to correctly import GeoJSON in PostGIS? [closed]

I'm trying to migrate GeoJSON data to PostGIS database and I thought that ogr2ogr is the tool: ogr2ogr -f PostgreSQL PG:"host={} user={} port={} dbname={} password={}" test.geojson -nln ogr_test ...
5
votes
0answers
106 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) { ...
2
votes
1answer
47 views

My woes rendering shape files on web-based mapping application

First, I'd like to let it be known that this is my first journey into developing mapping applications with such a large set of data. So, I am in way locked into the techniques or technologies listed ...
1
vote
0answers
70 views

Formatting Google Places API GeoJSON and Import to QGIS?

Hi Stackexchange I'm trying to export JSON or XML data to my desktop and import it to QGIS. This is the URL I'm using but it appears to be incorrectly formatted: ...
0
votes
1answer
87 views

How to query postgres with gis to get GeoJSON for GeoJSON tile layer?

I have a postgres database with one table like the following: CREATE TABLE post_pl ( gid serial NOT NULL, zip character varying(5), zip_n integer, city character varying(50), geom ...
1
vote
1answer
64 views

hiding some “feature”s in GeoJSON file on map

I have geojson file including boundaries of most countries in world. When I clicked on a "feature" (aka country, or polygon) I want to hide it while keep showing the others. because I am planing to ...
1
vote
1answer
110 views

Adding popup to geojson layer based on feature property?

I'm using leaflet and trying to add a popup to a point on the map that will return a property of the point from the geojson file. Going off this post has been helpful problem adding pop-up to GeoJSON ...
3
votes
1answer
212 views

SQL query to have a complete geojson feature from PostGIS

I would like to get a geojson feature with properties from PostGIS. I have found an example to have a feature collection but I can't make it works for just a feature. so far I tryed to modify the ...
2
votes
1answer
88 views

Unicode Decode Error for shapefile in Python

I have Python script for converting shapefiles to Geojson. My code works well if I use some usa data, but when I want to use some other encoding, it gives me this error: Traceback (most recent ...
2
votes
0answers
48 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" ...
2
votes
1answer
49 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 ...
1
vote
1answer
19 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 ...
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
57 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", ...
0
votes
1answer
70 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
58 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 ...
1
vote
2answers
49 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 ...
1
vote
1answer
103 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
41 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
82 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
88 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
97 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
61 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
0answers
55 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 ...
1
vote
1answer
51 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
1answer
107 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? ...
1
vote
1answer
127 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
38 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
1answer
58 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 ...
2
votes
0answers
44 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

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
103 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 ...
3
votes
2answers
90 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: ...
2
votes
0answers
59 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 ...
1
vote
0answers
59 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 ...
2
votes
1answer
46 views

Access to custom GeoJSON members in OpenLayers 2

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 ...
4
votes
2answers
292 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 ...
0
votes
0answers
73 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 ...
2
votes
1answer
30 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
vote
1answer
32 views

Retrieving routedescription geometry as GeoJSON

I'm building a small web-map and would wich to display a polyline representing a specific route via roads. With leafletjs it is easy to display the geometry on/over the map. So that's not the problem. ...
0
votes
0answers
42 views

geojson object with different representations and label/popoup conten

I have a quite complex geojson in terms of vertexes. It holds all the information which is needed in the webmap. it serves as the input for many layers like this (example for two): var represenation1 ...
1
vote
2answers
389 views

How to change Leaflet marker color on mouseover?

I'm having a hard time figuring out why the Leaflet method setstyle will change the color of a polygon but not the color of my markers. Polygon works fine: But the markers won't change colors: ...
0
votes
1answer
27 views

Not empty geometry having blank text

i'm having problem with geometry column, for some rows i have geometry with blank text, this query will describe more the problem : select geom, ST_AsGeoJSON(geom), ST_Isvalid(geom), ST_IsEmpty(geom) ...
0
votes
0answers
54 views

How to hide overlays in Leaflet layerControl if geojson var not found?

i would like to perform a specific task: i have a set of geojson layers, loading features from local files. i have the layercontrol on the map showing available layers to show/hide now, regarding ...
2
votes
1answer
123 views

Merge multiple linestring features into a single multilinestring

Using QGis or ogr2ogr how do I convert a vector file containing multiple linestrings features into a single multilinestring feature? At the moment I've been doing this manually by converting the data ...