Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [geojson]

GeoJSON is a geospatial data interchange format based on JavaScript Object Notation (JSON)

1
vote
2answers
229 views

How do I override default popup anchor in Leaflet GeoJSON polygon?

By default popups open wherever you click within the boundaries of polygons in Leaflet geojson layers. Here's an example: JsFiddle I would like to anchor the popup either: so it opens in a specific ...
5
votes
2answers
6k views

GDAL python cut geotiff image with geojson file

I wrote the function which cutting geotiff image by bounding box. First image is original. At second you can see result off my code. I don't use gdalwarp or any console utilities. But I have no idea ...
-3
votes
0answers
17 views
0
votes
1answer
35 views

Mapbox Vector Tiles appear to lack accurate intersection nodes?

Mapbox Vector Tiles appear to lack accurate intersection nodes. Is this a bug? i.e. should the tile's geojson include a shared node between two intersecting streets? Details: Using MVT's from http:...
1
vote
2answers
338 views

Using SqlGeometry.MakeValid to get a counter-clockwise polygon in SQL Server

The data I've loaded from a shapefile into a geometry column in SQL Server (using NetTopologySuite) is not producing valid GeoJSON when I export it because it doesn't follow the right-hand rule. I ...
-1
votes
1answer
203 views

Optimum set up for large data sets such as mobile service coverage maps [closed]

When serving up large data sets such as mobile coverage maps (custom tile) mashed up with MapQuest maps and MapQuest POIs, is there any performance benefit to using shapefile vs WMS image PNGs?
0
votes
0answers
13 views

Trigger click on geoJSON layer on dragend

I have a map where users can click on municipality polygones and the lat/lon values of the clicked position as well as the respective municipality name are saved in form fields for later use. I want ...
0
votes
1answer
271 views

Display animated GEOJSON path in Leaflet

I want to do something similar to this example : http://jsfiddle.net/3v7hd2vx/36/ But instead of creating a polyline between the two points, I want to display already digitalised routes all stored in ...
1
vote
1answer
158 views

Using ZCTA (Census ZipCode) polygones

I have downloaded some files from census website and did some cleaning to get ZCTA map for new york, but I noticed that there are overlapped regions (some regions are inside others). For some ...
1
vote
1answer
1k views

Selecting feature programmatically from GeoJSON using OpenLayers?

I am working on a project that uses OpenLayers (version 2.14)to display a Bing layer(GeoJSON format), I have no problem reading the GeoJSON and display features, but I want to select a feature ...
0
votes
1answer
362 views

How can I create layers depending on a property?

I have a .js file with coordinates for internships: var internships = [{ "features": [ {"type":"Feature","properties":{"category":"entretient","Name":"green"},"geometry":{"type":"Point","...
1
vote
2answers
171 views

Leaflet: Change displayed column on click

I have a GeoJSON layer in a Leaflet map showing buildings. The columns of the buildings layer contain electricity usage info by date (eg., the column 12052015 contains electricity usage on Dec 5, 2015)...
0
votes
1answer
173 views

Reading geojson properties in openlayers 4?

My code is very simple. This is my vector-source and this is how I render my geojson : var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), url: 'some_geojson_is_here' }); ...
1
vote
1answer
184 views

Showing popup image on hover and click

I want to to show an image when the mouse hovers on a marker or polygon, and on click show a popup with property attributes information from GeoJSON. I can manage to show attributes on click but I am ...
2
votes
2answers
873 views

How to find feature in OpenLayers exsisting layer

I have a vector layer in my OpenLayers applicaiton. var layer = new ol.layer.Vector({ source: new ol.source.Vector({ url: "my geojson url" }) }) my GeoJSON data fills the ...
1
vote
1answer
260 views

Load a GeoJSON layer with mixed geometries via QGIS's Python module

I have been able to connect my collection in MongoDB , write and store the collection to as .json file and load the GeoJSON file as a layer by QGIS's Python module unless there are mixed geometries. ...
0
votes
1answer
24 views

Show time series data with non-contiguous times using Leaflet TimeDimension plugin

My data is made up of squares forming a grid where the value of each square changes with time. The times are equally spaced with 1 hour intervals, however, the data is only available for a certain ...
0
votes
1answer
52 views

Load GeoJSON polygon time series with Leaflet Time Dimension plug-in?

I have a GeoJSON file with time series data, representing repeating polygons with varying data. I have managed to display the data for one time interval (a subset of the data representing one interval)...
2
votes
1answer
1k views

Popup with geojson data loaded using `Leaflet.FileLayer`

I'm trying to create an interactive map using the Leaflet.FileLayer plugin. This plugin allows me to load geojson files with description but I don't know how to show this description in Popup when ...
5
votes
1answer
564 views

Extract multiple admin levels from planet OSM

I am trying to create a multi-level choropleth map based on OSM data. I need the outline/boundaries. I would like to do this from the command line if possible. Here is what I think the steps ...
0
votes
0answers
39 views

Pushing features to external GeoJSON file

I am working on a project which uses Leaflet and leaflet.draw to show and draw shapes on the map. I also have a data.json file which I use to display former features generated from geojson.io. What I ...
3
votes
3answers
3k views

Making a GeoJSON layer editable with the Leaflet.Editable plugin

I'm new to Leaflet and the Leaflet.Editable plugin, but I'd like to make GeoJSON layer editable. When I mean "editable", I mean a user can stretch the polygons at will. Here is a good example of ...
0
votes
0answers
25 views

Chinese encoding problem in ogr2ogr from DXF file to GeoJSON?

I have a dxf format file named test.dxf which has some Chinese characters inside. I tried to transform it to GeoJSON file using ogr2ogr -f GeoJSON test.geojson test.dxf and returned GeoJSON showing ...
0
votes
2answers
707 views

Mapbox Feature icon-rotate as symbol

I have a requirement to enable a user to Rotate a single feature they've added to the map. The feature is part of a geojson FeatureCollection and styled as a symbol with layout properties. Obviously ...
1
vote
0answers
701 views

Weird polyline mapbox when drawing on android from pgRouting

I am creating android apps which can show the route that generated from pgRouting, and return geojson file. I already can draw the polyline on the web with mapbox-gl js with this code: var geojson = ...
10
votes
1answer
832 views

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
2k views

How to get Leaflet layer control to work with GeoJSON files hosted online

I am having issues getting Leaflet's layer control to work if using GeoJSON files stored online, on Amazon Web Services. The points from the online file do show up with their popups as expected, but ...
2
votes
2answers
1k views

How can i load GeoJSON data into SQL Server 2016?

I have this GeoJSON file { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature", "...
0
votes
0answers
32 views

Search the PostGIS database to display the result in a table then highlight it on the OpenLayers map by id [closed]

We did a search in the database according to certain search criteria, we displayed the results in a table by ajax request directly from the database. My problem is now I can not highlight on the map ...
0
votes
1answer
21 views

Get GeoJSON or simple WKT from a GPFeatureRecordSetLayer ArcGIS js API

Is it possible to get the GeoJson representation of a GPFeatureRecordSetLayer that is returned from GPServer task? I am able to draw the feature on the map (using the ArcGIS js API) with code like ...
0
votes
1answer
79 views

Export selected lines as GPX

I have created an option in my Leaflet.js web map that exports clicked lines as GPX, but it is just exports only the last clicked line. I need to export all clicked/highlighted/selected lines in one ...
22
votes
4answers
31k 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 ...
0
votes
1answer
51 views

How to change the color of GeoJSON layer?

I want to show my road network in red color. How can I change this default color of the road network. Where should I attach style property? var roadNetwork = new L.LayerGroup(); $.getJSON("{% url '...
0
votes
0answers
27 views

Quadtree based polygon indexing? (Python/Java)

I was wondering how to best represent the inside of any given polygon (GeoJSON coordinates) with some sort of indexing, like a grid or quadtree? See image below for an approximation of what I have in ...
16
votes
3answers
13k views

Generating GeoJSON with Python

I want to programmatically create a GeoJSON file using polygons from a shapefile but adding attributes from my own application. This is easily done for a shapefile: def create_data_dayer(self,...
-1
votes
1answer
48 views

Searching Polish districts in JSON

I am looking for a map of polish 'powiaty', eng. 'county' or 'district' (i.e. second-level unit of local government and administration in Poland, equivalent to a county, district or prefecture) in ...
1
vote
1answer
1k views

OpenLayers polygon fill not working with GeoJSON file as source

I'm trying to visualise some data in a custom shape on a map, and I'm stuck with styling it. I'm currently using the openlayers framework in combination with a geoJSON file that I generate in code. I'...
3
votes
4answers
4k views

Representing Time in GeoJSON?

I'm modelling a bus route as a series of waypoints. Most of these waypoints have just a latitude and a longitude and represent points along a road. However, when the bus gets to a bus stop, the ...
0
votes
1answer
20 views

OpenLayers5: GeoJSON: featureProjection vs dataProjection

What's the difference between featureProjection and dataProjection in OpenLayers 5, GeoJSON class?
0
votes
2answers
61 views

Opening GeoJSON in QGIS: projection problem?

I'm attempting to use QGIS to convert a GeoJSON to DXF. The problem is that the GeoJSON import is distorted, with the latitudes compressed. This isn't just a problem with the screen's aspect ratio: ...
0
votes
1answer
71 views

Uncaught TypeError: L.GeoJSON.AJAX is not a constructor

I want to add my json files to leaflet using leaflet-ajax plugin. But it always says following error: Uncaught TypeError: L.GeoJSON.AJAX is not a constructor Why this error is showing in my code? ...
0
votes
1answer
68 views

Calculating gained elevation on GeoJSON

I need to calculate gained elevation on Multilines GeoJSON files in a Leaflet.js map. Is there is any plug-in to do that? My GeoJSON files contains Z/elevation data in geometry.
0
votes
1answer
170 views

Getting width of road segment given its end points using Leaflet?

I want to highlight a road segment on a Leaflet Map. I have the coordinates of the end point of the road segment, so could plot it as a linestring. But the problem is how can I get the width of the ...
0
votes
1answer
49 views

Searches by area names in OpenLayers with request of AJAX in the PostGIS database

We built a GeoJSON: {"type":"FeatureCollection","features":[{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[669023.843,415221.025],[669031.588,415222.415],[669059.365,415154....
0
votes
2answers
65 views

Reading a GeoJSON via Java GeoTools API issue

I'm trying to read this GeoJSON from this string: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry":...
0
votes
3answers
247 views

Filtering interactive leaflet-map with dropdown-menu?

I try to set up a filterable "shot chart" like http://graphics.latimes.com/kobe-every-shot-ever/ with leaflet. I've a geojson file thats stores all the shots data, I've them showing up in a layer. ...
4
votes
0answers
293 views

Why does QGIS 3.4 and higher create .tmp file instead of refresh editing layer after saving?

I downloaded QGIS 3.4.0 and try to save edits in .geojson file. I can save new objects, but not edits in attributes. Insted of it, QGIS creates .tmp file with my chаnges into the same folder with ...
0
votes
1answer
87 views

Leaflet: how to select a feature by property

I have a geojson layer with continents info (got it from here), and I want to select a feature(continent) based on its name value or "CONTINENT" in this case. I did some research and ended up with ...
1
vote
2answers
52 views

Mapserver GeoJSON input

Is it possible for MapServer to read GeoJSON file and serve it as a layer in the .map file? Like how it can be done with shapefiles as shown below: LAYER Name 'land' TYPE POLYGON DATA '...
0
votes
1answer
37 views

How to repeat drawing function in Leaflet

I am trying to create a Leaflet.js web map that gives users the opportunity to draw lines. this line will be sent to mapquest elevation API to be retun to the map as a GeoJSON with elevation data ...