Questions tagged [geojson]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

Dissolving GeoJSON with nodes and lines to one average line?

I have a GeoJSON with two layers. One with lines and one with nodes. I'd like to dissolve it (or at least the layer with the nodes) to one single line, by averaging the positions. I've looked at Turf....
0
votes
1answer
92 views

Updating onEachFeature property of GeoJSON in Leaflet?

Here's my code: var eurojson = L.geoJSON( eurojson,{ onEachFeature: onEachFeature, style: EU_color }); var econjson = eurojson; econjson.setStyle(Econ); When I initialize econjson variable, I ...
0
votes
0answers
152 views

Converting TopoJSON data to GeoJSON using JavaScript in browser?

There are many articles about how convert GeoJSON to TopoJSON using JavaScript, but I could not find how to convert TopoJSON to GeoJSON in the browser. Response: Using http://d3js.org/topojson.v1....
0
votes
1answer
38 views

How can I add dynamic text/properties to a GeoJSON multipoint on each individual feature?

I'm drawing circles on a map based on lon/lat. These circles are drawn from "subarrays" in an array, e.g: myArray = [[array(18)]],[array(111)], [array(65)]....] I map each of these arrays using ...
0
votes
1answer
116 views

Coordinates remain very high when converting projections

I have this GeoJSON file which uses the following projection: EPSG:28992. I want to convert this to EPSG:3857 but I don't have GIS software available. I have tried ogre, but when I first convert it to ...
1
vote
1answer
267 views

Highlighting selected geojson feature and return to previous state when another one is selected using Leaflet?

I've a map with a geojson layer containing markers, polygons and lines. I made a module so that when a feature is clicked, its properties are displayed in a frame and not in standard Leaflet popup. ...
2
votes
1answer
239 views

How to snap to a geojson-vt layer (Vector Tile Layer)?

I'm using geojson-vt to render a large geojson (originated from OSM) file. This file contains all road from a state (extracted with overpass-turbo way[highway="*"]). I'm buinding a domain-specific ...
2
votes
2answers
334 views

GeoJSON put in the OpenLayers maps

I am a beginner in OpenLayers. I would like a GeoJSON to be displayed on the map. Can you provide me with some example code to allow me to build this small project? The GeoJSON code is: {"type":"...
2
votes
0answers
109 views

GeoJSON - Obtain linestrings inside a given bounding box

I have two layers in an Argentinian railroad-related project: one is for train stations and the other is for railroad lines. The first one has about 1100 points and the second, about 250 finely-...
0
votes
0answers
25 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
57 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
387 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
405 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
50 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
245 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
150 views

Building choropleth map using D3.js? [closed]

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
1answer
182 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
508 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
126 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
28 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
323 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
1answer
173 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, ...
3
votes
1answer
988 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
39 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
95 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
49 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....
3
votes
1answer
309 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
447 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
35 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
31 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 ...
2
votes
2answers
566 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 ...
1
vote
1answer
248 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
141 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
392 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
142 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....
1
vote
0answers
289 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
962 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
106 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 ...
1
vote
0answers
305 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
96 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
2k 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
30 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
42 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
61 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
242 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
237 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
17 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
58 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
367 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: ...
0
votes
1answer
229 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 ...