Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
11 views

Turf intersect doesn't always work with polygons

I have a GeoJSON of two obvious colliding polygons but turf.intersect doesn't seem to detect it. Here the GeoJSON: { "type": "FeatureCollection", "name": "invalid_import", "features": [ ...
1
vote
1answer
486 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 ...
25
votes
3answers
63k 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 ...
1
vote
1answer
180 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
0answers
19 views

Value error when trying to load line and polygon GEOJSONs into PyCharm/Python

I'm a newb so apologies if there's incorrect formatting etc here. I'm trying to use GEOJSON files to visualise some data in Python using GeoPandas (GDAL, fiona, shapely, numpy, matplotlib are all ...
1
vote
0answers
18 views

Generalization with GRASS explodes number of polygons that are exported to GeoJSON

I have a shape file containing polygons with 10 geographical districts that together form a city, which I want to generalize without "sliver" artifacts and export to GeoJSON. When running this vector ...
2
votes
1answer
39 views

Check if polygons of a GeoJSON file are included in polygons of another

I have two GeoJSON files. A province.geojson file and a constituencies.geojson file and I would like to know for each district polygon which province it belongs to. That is to say, for each polygon in ...
-1
votes
0answers
18 views

Geopoints: From single coordinate to bounds on map [closed]

I try to figure out how to come from a single given coordinate (lat/lon) to the nearest bounds which enclose this coordinate on a map e.g. streets or sea. Here two examples to give you a better ...
0
votes
1answer
29 views

Filter features outside the viewport in Mapbox

I have a huge GeoJSON file having around 100K features and I want to filter features outside the viewport. I tried multiple approach given on: https://github.com/mapbox/mapbox-gl-js/issues/8350 and ...
1
vote
2answers
55 views

Vector layer from MapServer WFS not displaying in OpenLayers 6

I want to display a WFS layer in GeoJSON format on my map via OpenLayers. All my layers in WMS appear, only the one in WFS does not appear. I did create a "WEB" block in the mapfile. And my layers are ...
1
vote
1answer
62 views

Select only the feature that overlapses its correspondant in another layer - Leaflet, qgis2web

I have 2 identical layers overlapping, each containing identical FeatureCollection values. Only one of them is added into the map. Is it possible that when clicking on a specific feature of the ...
1
vote
1answer
57 views

Loading GeoJSON in OpenLayers?

I am trying to load GeoJSON in OpenLayers, however, the polygon isn't visible on the map. What am I doing wrong? <!doctype html> <html lang="en"> <head> <link rel="...
0
votes
1answer
465 views

Display the data layer to info windows taken from GeoJSON

I have a problem for displaying data to info windows on the Google Maps Data layer. Here I use GeoJSON to load data. can anyone help me? var map; function initMap() { map = new google.maps.Map(...
10
votes
0answers
1k views

Extract TopoJSON directly from PostGIS

I have a simple "region" table: id (TEXT), name (TEXT), geom (MULTIPOLYGON). Here's the query I can use to extract a GeoJSON FeatureCollection: SELECT row_to_json(fc) FROM ( SELECT '...
0
votes
2answers
378 views

Leaflet GeoJSON map legend

I am struggling with creation of the map legend adequate to my GeoJSON stylization. The code looks like below: var geojsonMarkerOptions = { radius: 8, fillColor: "#ff7800", color: "#000", weight: 1, ...
1
vote
2answers
436 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
38 views

Format and Import to QGIS

I have a parcel which I would like to load into QGIS. The county's GIS website is not a standard Arc REST format, so I am struggling with the formatting. It uses "mapgeo" and I am not sure how to ...
2
votes
1answer
1k views

Combine multiple dynamic Leaflet filters [duplicate]

I'm very new to Leaflet and made a map using a GeoJSON Layer. I'd like to filter points from the GeoJSON Layer by a checkbox input. If I consider only one Parameter (Par1) with levels A, B and C I can ...
3
votes
1answer
40 views

ogr2ogr - accomodate spaces in -select properties

I have a geojson feature collection. Some of its features have spaces in their property names. I am attempting to use the -select argument to limit which properties are included in the output. Is ...
0
votes
1answer
20 views

QGIS: Open vector from URI with spaces

I try to open a pelias rest api link that returns geojson with add vector layer (ctrl+maj+v) in QGIS If i try http://localhost:4000/v1/search?text=belgium, it's ok. If i try http://localhost:4000/v1/...
0
votes
1answer
57 views

GeoJSON layer fails to load

I'm downloaded OpenLayers v6.3.1 libraries and successfully displayed a simple map on my local server, and nom I'm trying to load a GeoJSON file as a new vector layer into this map. But for some ...
0
votes
1answer
18 views

Create Multiple Shapefiles from GeoJSON

I am attempting to convert a GeoJSON Feature Collection into multiple shapefiles. The shapefile a feature ends up in depends on a specific property of the GeoJSON, layer_id. My desired output is a ...
0
votes
1answer
668 views

Creating 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
0answers
28 views

GDAL C# Bindings

I need some help on usage of GDAL C# bindings to convert geoJSON to MVT. How do I know that, below call is complete? We observed that below call is Async (All the code lines are executed and Parent ...
1
vote
1answer
49 views

How to select a given feature in a GeoJSON file using Python? [closed]

Scenario: I have a large (120+ MB) .geojson file that represents a bunch of LineStrings features. Here is an example feature selected using json.dumps(geoFile['features'][0]): { "type": "...
1
vote
0answers
14 views

D3.json doesn't fetch data but no error [closed]

I am trying to load a geojson file. I get an error (404) if the file doesn't exist but nothing happens if the file exists. I have tried different versions of D3 ... v3, v4, v5 console.log("hello"); //...
2
votes
2answers
3k views

Add a vector GeoJSON layer in OpenLayers 5.1.3

I am trying to add a simple capitals GeoJSON vector layer to my map for basics learning, without managing to get it to work. I spent hours of roaming the documentation API. As follow is my script: ...
0
votes
1answer
67 views

Issue with using MultiLineString in Leaflet Animated Marker Plugin

This response on image below is coming from Geoserver as MultiLineString and I restructured it to LineString like on image because Animation plugin doesn`t support MultiPolyline json structure and ...
3
votes
3answers
222 views

How to convert an OSM relation to a list of lat/lng points?

I would like a convert a relation (e.g. https://openstreetmap.org/relation/2851613) to a list of coordinates that can be displayed on a map, potentially using geojson. I ported over this converter ...
1
vote
1answer
37 views

Opening vector layer from GeoJSON file

I have a vector layer of rectangles in QGIS 3 that I export as a .GeoJSON- file. I want to change those geometries to new polygons with certain dimensions, for which I use Python. I then save those ...
1
vote
1answer
76 views

Dividing GeoJSON into two separate layers in Leaflet

Basing on this example: http://www.gistechsolutions.com/leaflet/DEMO/sports/sports.html I would like to do the same in my case, however, my way is slightly different: Firstly I have made a major ...
1
vote
1answer
386 views

Search box for GeoJSON in Leaflet

I have been struggling with adding a search box for GeoJSON stuff, similar to COntrol.geocoder in Leaflet. I used the advice under this post: Adding one search box for multiple GeoJSON polygon layers?...
1
vote
1answer
193 views

Leaflet filter with multiple GeoJSON layer properties

Regarding to the following queries https://stackoverflow.com/questions/59141456/leaflet-problem-with-filtering-the-geojson-layers GeoJSON filtering based on properties in Leaflet not working I ...
1
vote
1answer
26 views

How to display the GeoJSON from PHP on the map?

I am using MapboxGLJS. I retrieve the coordinates from my database and I put it in GeoJSON format on PHP which look like this: <?php $sql = "SELECT * FROM waypoint"; $...
0
votes
1answer
49 views

Splitting polygons based on points density [closed]

I have a geojson file with polygons representing administrative regions. I also have a shapefile from which I can extract a list of points of interest (schools). I can iterate over this list of ...
7
votes
4answers
5k views

Which style options are available for polylines in Leaflet?

I added a polyline layer as GeoJSON within Leaflet and want to style it. The following options to set the style I could find (and which work) are: color weight opacity What are other available ...
18
votes
5answers
12k views

Polygons and MultiPolygons should follow the right-hand rule

http://geojsonlint.com/ I get error Polygons and MultiPolygons should follow the right-hand rule I used it for past 3 years without any problem with my old geojson file. Now geojsonlint enforce the ...
0
votes
1answer
72 views

What is the difference in purpose between STAC and OGC services?

I am confused about the purpose of the Spatiotemporal Asset Catalog. How does it differ from OGC services which specify accessing data through various services? Is it another service?
0
votes
1answer
52 views

Avoid duplicate properties from GeoJSON file in a Leaflet map

I'm posting this question here because it is related to GeoJSON and Leaflet. Here are my requirements : My map is ready and functional. I'm using markerCluster to create clusters when several ...
0
votes
2answers
160 views

Leaflet GeoJSON popup marker customization

I would like to customize leaflet .bindPoPup geoJSON marker. I found some solutions, although I would like to use my existing one. Basically the operation leads to merge two functions as per below: ...
0
votes
0answers
22 views

What should the GeometryField encoding be for a GeoJSON data source in an OGR VRT?

I am trying to produce a color gradient for a temperature map and I am using gdal_grid, specifically: gdal_grid -zfield "temperature" -a invdist:power=2.0:smoothing=0.0 -txe -72.5 -77.0 -tye 38.6 41....
39
votes
3answers
15k views

Convert GeoJSON to TopoJSON

How can GeoJSON data to TopoJSON be converted? TopoJSON files are often smaller than GeoJSON and the conversion allows you to incrementally simplify a dataset, if you wish.
18
votes
1answer
23k views

Passing Filter Parameters to GeoServer WFS via 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. However,...
0
votes
0answers
35 views

How can I convert polygon features stored in Shapefile, GeoJSON or GML (over WFS) into obj file

I am currently working on an augmented reality application using ARKit. The required file formats are DAE or OBJ. My clients would like to display information stored within Shapefiles, GeoJSON or GML ...
0
votes
1answer
40 views

Leaflet - global variable in onEachFeature returns value of next feature

Thanks to TomazicM I got my GeoJSON import up and running. Here's the whole code, I highlight the problematic bits thereafter var map = L.map('map', { crs: L.CRS.Simple, minZoom: -...
0
votes
2answers
112 views

OpenLayers doesn't display US Census-based GeoJSON Layer

I'm getting started with OpenLayers and all was going well until I tried to use my own GeoJSON file. I started with the Cartographic Boundary Shapefiles - Counties from the Census website, loaded it ...
2
votes
2answers
84 views

How to work with GeoJSON, Leaflet and pixel coordinates?

I'm a noob trying to piece together a - as I thought - simple thing: A Leaflet map based on a raster picture with markers coming from a GeoJSON file. As this is a fictional map, I use the CRS.Simple ...
1
vote
1answer
34 views

Leaflet change GeoJSON geoms style

I have GeoJSON that could be either a point or line and I am trying to make the layer red. Here is the code: function styling(feature) { return { color: 'red', }; } ...
0
votes
0answers
16 views

Is there a tool to draw GeoJSON points on a raster image?

I know there are tools like geojson.io which allow me to draw points on a real world map. But I work on a fictional map, so all I have is a big raster image. Later I want to show it in Leaflet using ...
1
vote
1answer
58 views

How to append the .csv data into GeoJSON using Python

The .CSV file has 6 indents, we need to append all the indent with GeoJSON file and updated file ready for open in QGIS import json import copy import csv import sys #print(sys....

1
2 3 4 5
40