Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [geojson]

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

0
votes
0answers
12 views

Plotting GeoJSON or a shapefile as a choropleth interactive map

I need some help to complete the following code to display choropleth interactive map by clicking on a button. # Plotting the shapefile observeEvent(input$shape, { p1=leafletProxy("gridmap") %>%...
1
vote
0answers
20 views

Import CSV to QGIS 3 where the geometry is in GeoJSON format

I have a CSV file with different attributes for each polygon. One of the attributes (column name) is GeoJSON which hold the geometry. For example, in the first polygon the geojson attribute is: {"...
0
votes
2answers
23 views

Find closest point using L.GeometryUtil.closest and open its popup

How do I use: L.GeometryUtil.closest(myMap, coords, b) to find the closest point in a geojson point layer in leaflet. I have tried several things. And the error I receive is: Uncaught TypeError: ...
0
votes
0answers
16 views

How to convert geometry in the GeoJSON from PHP and insert polygon in PostGIS

I'm a beginner in PostGIS and GeoJSON. I need to extract every geometry from GeoJSON and store them in the PostGIS database as polygons. For each entry in GeoJSON I would like to be able to store ...
0
votes
1answer
25 views

Variable iconUrl in Leaflet, use GEOJson property voor iconUrl definition (Leaflet)

My script is as follows: function clickFeature(e, feature) { var layer = e.target; var string = new feature.properties.categorie; var bigIcon = new BigIcon({iconSize: [24, 40], iconUrl: +string+...
0
votes
1answer
36 views

Union GeoJSON polygons

I'm using OpenLayers and give some try on Turf.js, but with no result. I've an array with several GeoJSON string and I want to merge them all. (Below an example of just one element of my array that ...
1
vote
1answer
31 views

Building choropleth map using D3.js? [on hold]

I want to build a Choropleth map, from a specific region (in my case Portugal) with D3.JS and while searching for tutorials and support, I have found this website. Following the procedure, I have ...
0
votes
0answers
17 views

Load GeoJSON generate from MySQL with PHP [on hold]

I need help with creating the code in the Leaflet to load GeoJSON using the PHP script. I tested the echo from PHP at http://geojsonlint.com/ and GeoJSON is showing it correctly has a good structure.
0
votes
1answer
19 views

From Overpass Turbo to GeoJSON without map

I would like to extract boundaries of some areas from Overpass Turbo in GeoJSON format. At the moment I am using the website UI www.overpass-turbo.eu, write the query, execute it and export in GeoJSON ...
1
vote
2answers
40 views

Leaflet - How to show feature properties in a box that is not a popup?

Popup giving features properties are interesting but I would like to make a side bar where properties of a clicked feature would show. I've got the traditional code for displaying geojson features ...
0
votes
0answers
24 views

Displaying real-time GeoJSON data in Android Google Maps

I'm building my first Android Google Maps app and I have some questions about how to add real time data. I want the marker of every point changed the color or the icon when the properties of the ...
0
votes
0answers
15 views

field information lost when importing geojson file into qgis

I have an attribute in the geojson file which contains a list of elements (usually 3). The attribute has 700-1000 characters. I learned that for shape files, qgis can only have fields with less than ...
2
votes
1answer
54 views

Drawing a GeoJSON with D3js on OpenLayers 4

The goal is to interact with the DOM based on users input using JavaScript. I have now considered using D3js (v5) to draw the points. Without the base vector layers (loaded as a geojson) and ...
0
votes
0answers
33 views

Is there a way to convert a geojson file to shapefile in Qgis 3 processing modeler?

I need to input geojson files into a model and one of the algorithms, dissolve, doesn't work with geojson files resulting in an 'Invalid geometry' error. Exporting and saving over 1000 files as ...
0
votes
1answer
31 views

Leaflet : Differentiating colors dynamically

Here's what I want to do: Show all features of the GeoJSON file using Leaflets. Connect to the database, in a database there is a table that has an ID column that matches the GeoJSON file feature, ...
1
vote
1answer
82 views

Multiple on-the-fly filtering based on markers' features on leaflet

I would like to filter the markers on my (geojson) layer according to two features: year and type of event, ideally using both filters (year and eventType) as check-boxes without using layerGroup at ...
1
vote
1answer
22 views

What are the encodedpath and simplepath properties of a GeoJSON geometry?

I have GeoJSON FeatureCollection with an encodedpath and simplepath property instead of a coordinate array. For example: "geometry": { "type": "LineString", "encodedpath": "sdecF`...
0
votes
1answer
37 views

Nothing happened when call function remove layer on leaflet

I'm tryng to call function for clear layer. But nothing happened, using this <li class="list-group-item"> Remove All <div class="material-switch pull-right"> <input ...
0
votes
1answer
39 views

Converting bulky shapefiles (54 MB) to GeoJSON

I am trying to convert my shapefile to GeoJSON using the below code snippet: StringWriter writer = new StringWriter(); String geoJson = null; FeatureJSON fjson = new FeatureJSON(); fjson....
2
votes
1answer
33 views

Coordinates offset when using Mapshaper to convert shapefile to GeoJSON

I'm a newbie to the GIS world and I'm trying to convert a shapefile to GeoJSON for use in Mapbox. When I view the resulting layer in Mapbox, most of the features appear southeast by 20-30 feet of ...
0
votes
1answer
34 views

Mapbox GL JS - 3D Buildings - display only some buildings in 3D

I am using this example provided by mapbox gl js: Display buildings in 3D Now the problem is I only want to show some buildings in 3D. How can achieve this? I don't know where to find the source-...
0
votes
0answers
14 views

Are there any command line tools that convert GeoJSON to tiles directly

Are there any command line tools to convert .geojson files to tiles in PNG format? I have read about many questions regarding the same but I didn't find any concrete answer/implementation. Planning ...
0
votes
0answers
23 views

CAD To GeoJSON after publishing it shows the job failed

I have written the code for CAD to GeoJSON. When I ran ArcMap or ArcCatalog it's working fine, after publishing the code it's giving the error. The code is too long. Can you provide the code ArcGIS ...
1
vote
2answers
92 views

Generating Steiner tree using Network X in Python?

I'm trying to generate a Steiner tree in Python using NetworkX. I have a range of geolocated nodes saved in the GeoJSON format, allowing me to visually validate the outputs in QGIS. A radially ...
0
votes
1answer
67 views

Changing marker symbol in Leaflet AJAX

I have got a .json file to display in Leaflet map.The points are shown with custom blue dot markers. I cannot get to change them.How do I get to change the symbol? var greenIcon = L.icon({ ...
0
votes
1answer
35 views

Programmatically add className to GeoJSON feature Popup in Leaflet

I'm trying to add a className to a Popup with a function, but when I use a function, the code of the function itself gets returned. What am I doing wrong? function popUp(layer){ return '&...
2
votes
1answer
58 views

Leaflet Search: cannot search for Point types

I followed this repository Leaflet Search and I want to combine search box, using polygons, polylines, and point. for polygons and polylines is working fine. But not for points. The property Name ...
0
votes
1answer
35 views

Remove L.esri.query featureLayer from map ESRI Leaflet

Using ESRI Leaflet I am adding markers to the map from an ArcGIS online feature service. I do this using the L.esri.query method similar to: function slideChange(time1, time2, service) { L.esri....
0
votes
0answers
42 views

GeoJSON: Rendering 3D building in Cesium via GeoServer

I am trying to make a 3D web application which should be able to render 3D building using Cesiumjs and loading data from PostgreSQL/PostGIS via GeoServer. I have MULTIPOLYGON Z and MULTIPOINTS Z for ...
0
votes
2answers
76 views

L.Control.Search: Using looping for searching data on Leaflet

Is there a way to find data from different layers and different propertyNames? I have several GeoJSON data files, with different properties. At this moment I can only search one GeoJSON. For looping ...
2
votes
1answer
41 views

PostGIS GeoJson Query Not Validating

I am using the following query to create a GeoJson response: SELECT json_build_object( 'type', 'FeatureCollection', 'features', jsonb_agg(feature) ) FROM ( SELECT ...
0
votes
0answers
45 views

Comparing speed of Spatial Analysis with GeoJSON versus shapefile in QGIS?

I have a large dataset that I want to perform spatial analysis on in QGIS. Specifically, I want to perform a polygon intersection analysis between two polygon layers. Given the size of the dataset ...
1
vote
1answer
47 views

How to obtain percentiles of classes in classified image in Google Earth Engine?

https://code.earthengine.google.com/e430e2a79aecb65e3efbce23779a0abc I have written this code for supervised classification using the cart classifier. Now I want to extract the no. of pixels in each ...
2
votes
3answers
243 views

Import local GeoJSON file into Leaflet

I just used a leaflet. From the geoJSON demo page I saw if you want to include data you have to use <script src="data/us-states.geojson"></script> and if you open the files looks like ...
0
votes
0answers
12 views

Error with limitto when importing OSM data into PostGIS with imposm

I tried to run PostGIS and imposm in docker. However when I want to import OSM data from a planet.osm file with imposm I run into the error that it does not recognize the GeoJSON file I reference with ...
0
votes
1answer
33 views

Why am I unable to display attribute data in map?

In the JSON file I have an attribute called FairValue which belongs to the polygon feature class. Similarly there is another attribute called Survey_Num. I want to display both these attributes on ...
0
votes
1answer
22 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 ...
4
votes
1answer
80 views

Command line tool to repair self-intersection in GeoJSON

I am working with this file. Kansas seems to have a self intersection: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -98.918045000000006 37.379078 at -98....
0
votes
0answers
25 views

Combine GeoJSON files into bigger shapes with external JSON to merge on

I have a shapefile of New York ZCTAs here I also have these neighborhood definitions that map zip codes to New York City Boroughs. I'd like to take my "all of New York zip code" data and: Clump up ...
0
votes
0answers
14 views

How can GeoServer transform a 'no RHR layer' into a RHR layer?

We are using GeoServer 2.11.2 and Mapbox. We have many layers that do not follow the rule of the right hand and we need to serve them to other application. The problem is that we have to show in a ...
-1
votes
1answer
27 views

Exclude specific GeoJSON data by polygon [closed]

Given geospatial data as GeoJSON, how can I filter this data to exclude geometries within a specified polygon? I need this to work in JavaScript. Example: function filter(featureCollection, ...
1
vote
1answer
78 views

Masking GeoTIFF file after GeoJSON through rasterio - “Input shapes do not overlap raster”

So my intention is quite simple: I have a 4-Band TIFF file I want to crop after a polygon shape. However, I'm getting the following two exceptions WindowError: windows do not intersect ValueError: ...
-1
votes
0answers
31 views

Searching series points inside polygons in mongoDB

I have to check performance of mongodb queries. I have two documents. One of them contains 600 polygons. The second contains 10,000 randomly generated points. Both are in two separate collections (...
-1
votes
0answers
34 views

Leaflet.js geoJSON popup stopped working?

I have been developing a map that consumes geojson data and places markers on a map and creates popups. I have had this functionality working, but recently it has stopped working - I get the error "...
0
votes
1answer
62 views

Openlayers displaying local pbf at wrong location

Need help for displaying of local pbf file, it does show tiles but at wrong location and when zoom-in the whole feature set split into 4 locations. First Openlayers v 4.6.5 is not displaying local ...
1
vote
1answer
57 views

Leaflet geojson merge attributes

I need to merge the attributes on a leaflet geojson layer and another geojson based on a common field. I have tried the following code, which does put the keys in the layer but all values are ...
2
votes
1answer
58 views

mbtiles-extracts does not work with my geojson

I am working with the mbtiles-extracts library: https://github.com/mapbox/mbtiles-extracts. Given an mbtiles file and a geojson, the library extracts mbtiles cutouts of the polygons in the geojson. ...
0
votes
0answers
67 views

Seeking equivalent of Google Maps API 'title' for polygons?

I am using Django, GoogleMaps API, and GeoJSON to draw polygons from the spatial database to map. I wanted to add a title so that when you hover over/click on (don't care which) the name or ID of the ...
1
vote
0answers
71 views

What is the best method to serve large GeoJSON data in OpenLayers?

I would like to know about the best method to serve large GeoJSON data in OpenLayers. I am using extent-based loading and clearing the source when it is in out of extent. But still it is hanging while ...
0
votes
1answer
21 views

Reproducing Difference operation from QGIS in pure Python?

I have two GeoJSON files and I want to make the difference of those two layers, QGIS does it really well, but I need to do it in pure Python 2.7. Anyone know how to do it ?