The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
12 views

Divide a polygon in to smaller polygons using JavaScript

Im having a polygon data { "coordinates": [ [ [ 76.878324056172, 8.58553370915678 ], [ 76.8928294425245, 8.58273302582363 ...
2
votes
3answers
52 views

Convert large OSM files to GeoJSON

I have been trying to convert a large OSM file (5G) to the GeoJSON format. All the tools I have been using, use extensive memory and throw an out of memory exception. What is the best way to convert ...
1
vote
1answer
208 views

How to text in selected polygons using QGIS in geojson file?

I have upload geojson file in QGIS. there total 8 polygons (8 taluka's co-ordinates) now, my question is I want to just highlight 4 polygons( 4 taluka's) and display in selected 4 polygons ( "number ...
1
vote
0answers
13 views

Finding boundary coordinates of user current location with a given radius

I have my current lat and lng details { "lat": 8.561032, "lng": 76.846333 } And from this I need to build a boundary around me with given radius. So How can I get the boundary ...
1
vote
0answers
15 views

Best way to share data [on hold]

We have a decent dataset of layers and we want to publish it for everyone to easily use in their applications. The source is in .gdb and so far I generated .geojson (using ogr2ogr) out of it. From ...
0
votes
1answer
119 views

Making map use set of coordinates in QGIS

I have made a custom google map with the google map api which has a few functions that work well within it - one specifically is limiting the user on what they can view within the bounds of the map. ...
1
vote
1answer
56 views

Erasing a part from a line-GeoJSON

Consider the following line (GeoJSON): { "type": "FeatureCollection", "name": "longline", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": ...
1
vote
2answers
659 views

Getting outline of polygon as GeoJSON?

I have geojson data that draws shapes similar to the following: I wanted to know if there are any operations that can give me the geojson which represents the outline of these shapes represented by ...
2
votes
1answer
53 views

How to load GeoJSON data in OpenLayers?

I'm using GeoServer for serving map in the GeoJSON format. I din't find any working example. Here is my code snippet. <!doctype html> <html lang="en"> <head> <link rel="...
0
votes
1answer
46 views

How to efficiently compute if point is on polyline?

I have a CSV file with data in GeoJSON format with 10k+ lines with various open / public data I want to use. So far it's in a file but later it may be in a SQLite database or even better be kept in ...
1
vote
0answers
23 views

Generically filtering multiple GeoJSON layers in Leaflet

I am trying to implement a function that will filter multiple GeoJSON layers in Leaflet based on the contents of a text box on the same page. For instance, a user may write 4 5 7 10 in the textbox - ...
1
vote
0answers
31 views

Encoding GeoJSON to something other than 'UTF-8' from QGIS

I want to save the shp file as GeoJSON and encode it to system, but my QGIS is disabled for selecting an encoder. Adjusted the 'ignore shapefile incoding declaration' option, but it did not work. I ...
2
votes
1answer
547 views

Searching for UN regions/sub-regions shapefile

for a visualisation project I need the boundaries of the UN regions as defined here : http://unstats.un.org/unsd/methods/m49/m49regin.htm That's 21 polygons for the sub-regions. I have been looking ...
4
votes
1answer
242 views

Saving Overpass query results to GeoJSON file with Python?

I have just started to use Python and I would like to make a query to Overpass and store the results in a geospatial format (e.g. GeoJSON). As far as I know, there is a library called overpy that ...
3
votes
2answers
481 views

GeoJSON data not getting displayed on Openlayers map in Geodjango

I have the following code. models.py class PFT(models.Model): species=models.CharField(max_length=50) geom = models.PointField(srid=4326) objects=models.GeoManager() def __str__(...
32
votes
5answers
19k 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. SELECT row_to_json(fc) FROM ( ...
0
votes
1answer
147 views

Export GeoJSON files from Targomo

After the Route 360 QGIS plugin stopped working, I developed my own script to handle CSV to GeoJSON travel time polygons. Up until recently, I had been using this page I created to turn CSV files ...
2
votes
1answer
20 views

Image slideshow in leaflet map based on geoJSON layer

To be more precised like previously Image slideshow implementation into Leaflet map I have developed my code in the jsfiddle, which states where the problem is: https://jsfiddle.net/Krukarius/...
1
vote
1answer
40 views

Importing and viewing polygon layer on map?

How is it possible to import and view a polygon layer (I have it in a shapefile) on a map inside MIT App Inventor? Maybe with LoadFromURL method, but in this case which file I should paste associated ...
0
votes
1answer
18 views

FeatureCollection is not a valid type of discriminator Error

I'm trying to pull in Planet data to visualise satellite imagery using Jupyter. I'm new to Python and I get an error like this: { "field": { "filter.config.0.config.type": [ { "message": "...
1
vote
1answer
11 views

GeoJSON from PostGIS view using PDO

I want to use PostGIS data to display it in Leaflet. I've created a PostGIS view (v_baeume_GeoJSON) that delivers already valid GeoJSON. When I retrieve the data from this view using PDO I have to do ...
1
vote
1answer
43 views

Leaflet map GeoJSON placemarks with image slideshow

I am wondering how to create leaflet map where GeoJSON placemarks provide the image slideshow as per the example below: https://docs.mapbox.com/mapbox.js/example/v1.0.0/markers-with-image-slideshow/ ...
-2
votes
1answer
61 views

Python script for converting Esri shapefile into GeoJSON using Python and GDAL/OGR?

I know Esri shapefile can be converted into GeoJSON using Python and GDAL/OGR. Following command works on the terminal. ogr2ogr -f GeoJSON -t_srs crs:84 outfile.geojson inputfile.shp I want to do ...
0
votes
0answers
14 views

Where would I be able to obtain or purchase GeoJSON data for Manhattan submarkets?

GeoJSON data contains arrays of coordinates that create polylines. You can find geoJSON data for the 50 U.S. 50 state borders, for example. I would like proper geoJSON data for this: https://www....
0
votes
2answers
287 views

Changing Color and Opening Label on Hover

I'm initializing GeoJSON markers in Leaflet, and I'm trying to change the color and open a label on mouseover. Upon mouseout, I want to change back to the default color and close the label. However, ...
0
votes
2answers
337 views

Exporting buildings and their types with Overpass

I am trying to extract all buildings in one file within a certain city (Radebeul, Sachsen, Germany) from Overpass Turbo. My query looks as follows: [out:json]; // fetch area “Radebeul” to search in ...
4
votes
1answer
6k views

Leaflet.draw: add attributes and save to file

I want to create a simple web page, where user can create features (with Leaflet.Draw), add attributes (ex. name/description) and save created features to file, ex. geojson. So far creating, adding ...
1
vote
2answers
196 views

ogr2ogr import fails with “ERROR 1: GeoJSON object too complex”

I'm trying to import a large (8.8GB) GeoJSON file to a Postgres 9.6 database with the following command: ogr2ogr -f "PostgreSQL" -nln final_diffs PG:"host=localhost dbname=inspire user=me" diffs....
0
votes
2answers
48 views

Add a local GeoJSON file as a layer with GeoJsonLayer

I turned a state boundary feature class into a geojson file called region2_boundary.json: { "type" : "FeatureCollection", "crs" : { "type" : "name", "properties" : { "name" : "...
1
vote
0answers
27 views

OpenLayers 4 get style from GeoJSON not find

We created an API that returns a GeoJSON in accordance with this styling guide but then OpenLayers doesn't find the style key once I want to style each feature, here my code var appLayer = new ol....
1
vote
0answers
37 views

Problem with loading big data (GeoJSON) via PHP

I have a problem with loading (big) data via PHP from a spatial database. I let run this project on a localhost Apache Server. From a data count of about 30.000 edges I get an error VM885:1 Uncaught ...
1
vote
1answer
57 views

Heatmap with GeoJSON, Leaflet and Leaflet.heat plugin

I'm using the Leaflet.heat plugin to create an heatmap in Leaflet. I've some problem with GeoJSON data that I've loaded through a WFS service on GeoServer. I used the function geojson2heat to get the ...
0
votes
0answers
31 views

Openlayers 5 adding GeoJSON point layer using geolocation-orientation as base

I am using the example geolocation-orientation script as a base. (it is really awesome!) I want to add a GeoJSON point layer, but am confused about where and how to add that layer. The marker should ...
1
vote
1answer
522 views

GeoJSON and GML WFS not working after GeoServer upgrade

I've recently migrated Geoserver from a Geoserver 2.1 to a clean install of Geoserver 2.5 and copied across my data files. However, I'm not finding that clicking Layer Preview, going to the All ...
1
vote
1answer
23 views

Batch open GeoJSON LineString from files with multiple features

I want to open multiple GeoJSON files, each have Points and LineStrings - I only want the LineStrings. I want to open potentially 1000s of files so don't want the popup asking if I want Points or ...
0
votes
1answer
74 views

Quick Import FME Reader Gallery Not Populated with FDS (ArcGIS 10.5 Adv Licence)

I wanted to import GeoJSON files, but after installing the Background GP and Data Interop packages, I find that the FME Gallery contains only GML and WFS formats. This is with both ArcGIS 10.4 and ...
6
votes
2answers
128 views

GeoJSON object equality

I've searched both the 2008 spec and RFC7946 and can't find anything about when two GeoJSON objects would be considered equal. I wonder if anyone can enlighten me? It seems to me the options are: ...
1
vote
1answer
122 views

Performing reverse-clip/difference() point GeoJSON from polygon GeoJSON in QGIS?

I am trying to clips the points outside of a polygon GeoJSON. In QGIS(2.18.2) vector-> geoprocessing tools -> difference deletes the geometry but keeps the attributes of the points. The ...
1
vote
1answer
25 views

Add GeoJSON features from an API call in OpenLayers 4, layer not displayed

I'm trying to create a little demo to show the data from our API into a map but I cannot see my layer Here my code, is just basic for the moment, we just need to display the data: const projection = ...
0
votes
0answers
21 views

Add GeoJSON features from an API call in OpenLayers 4

I'm trying to create a little demo to show the data from our API into a map but I have all the time the error: Uncaught TypeError: feature.getId is not a function Here my code, is just basic for the ...
1
vote
1answer
23 views

Pop up appearing blank after JSON parse?

My aim is to retrieve the attribute list of a WMS layer. The concept is to fetch it as JSON data, then parse it and display it in a pop up. I am using OpenLayers3 with local GeoServer and JavaScript. ...
1
vote
0answers
10 views

Merging overlapping GeoJSON LineStrings (Tippecanoe) and add visualization

I would like to merge overlapping GeoJSON LineStrings and visually style merged LineString. I have a database of GeoJSON LineStrings which represent routes people drove. I would like to visualize ...
2
votes
1answer
111 views

Largest polygon inside a GeoJSON multipolygon

How to find the largest polygon in GeoJSON of type multipolygon so that I can add a Leaflet tooltip to the largest polygon rather then a random polygon in multipolygon? I have a Multipolygon and when ...
0
votes
1answer
19 views

Extract custom shape area from Openstreetmap pbf

I have a full-country data download of OSM from http://download.geofabrik.de/ . I want to extract OSM data for a target area that is thin and winding/irregular in shape. I could take the max-min lat-...
1
vote
0answers
19 views

Openlayers GeoJSON reprojection issue 4.3.3 vs 5.3.0

While switching from ol 4.3.3 to 5.3.0 I encountered a problem. The WMS layers work as I expected (display in the right location), geojson data don't. I read all the data from the same service in ...
1
vote
1answer
112 views

Angular - How to visualize GeoJSON on Google Maps

I am using @agm/core for visualization GeoJSON on Google Maps. But I can't display my buildings on Google Maps. I think the problem is the geometry that is represented as multiple аrrays. I used FME ...
1
vote
1answer
30 views

Transforming a GeoPackage table's geometry column into GeoJSON?

I have a GeoPackage that is downloaded to client devices for a mobile app. I need the clients to query the GeoPackage to retrieve a GeoJSON representation of the geom column. I'm familiar with ...
6
votes
3answers
8k views

Convert WKT to GeoJSON with Leaflet

I have a point type WKT geometry column in a MySQL table storing the location of some stores. I want to display it on a Leaflet map on my website. I've found plenty of tutorials to doing this on ...
1
vote
2answers
325 views

Overriding 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 ...
1
vote
1answer
354 views

Displaying 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 ...