4,357 questions
1
vote
1
answer
204
views
Manually parsing geojson into a dataframe
I would like to work step by step to convert a .geojson into a tibble (or dataframe).
Here's a minimalistic geojson example which I stored in a file called test.geojson (note that the geometry field ...
0
votes
1
answer
298
views
How to add linestring in OpenLayers from GeoJSON property
I have a map with a simple GeoJSON file layer (several towns) which has a 'bbox' property for each town. It is a point or a linestring. The GeoJSON file looks like this:
{"type":"...
1
vote
1
answer
112
views
How to overlay lat and long datapoints on top of plotly geojson map
geojson map downloaded from here:
https://github.com/codeforgermany/click_that_hood/blob/main/public/data/ireland-counties.geojson
code example from here: https://community.plotly.com/t/scatter-geo-...
0
votes
1
answer
514
views
Merging geojson line geometries within a single sf object based on shared feature value (conditional st_combine?)
I am working on a personal project trying to combine open data sources from municipal government. I have practically no prior experience with working with geospatial data, so visualising insights ...
0
votes
2
answers
291
views
How to add minimap on the sidebar in OpenLayers working by click
I have a simple OpenLayers map with a GeoJSON layer (several cities as points and labels) and a working sidebar where the properties of each city selected by mouseclick are displayed. In simplified ...
-1
votes
1
answer
561
views
Reading geojson file to convert to sf
I have a geojson file which i need to read/convert to sf object
I read it with geojsonR package and it shows as lists of lists, but i need it to sf.
I tried using st_read as suggested here but it ...
0
votes
1
answer
194
views
Google Maps Javascript API loadGeoJson styling problem
How can I download the GeoJson, but not show it on the map? I thought "visible: false" would do this, but it's still displaying the GeoJson on the map. I want it to be downloaded but not ...
0
votes
1
answer
74
views
I've done everything from the vue 2.x version to the webpack settings, but I can't import the geojson file
I am trying to add a layer with geojson using openlayers.
However, in the vue2.x version, the geojson file cannot be imported, so the layer cannot be added.
My webpack config right now is(vue.config....
0
votes
1
answer
640
views
Getting error lexical error: invalid char in json text
I am getting the error lexical error while running the following codes
library(highcharter)
library(shiny)
ui <- fluidPage(
highchartOutput("map")
)
server <- function(input, output)...
0
votes
1
answer
57
views
Sometimes when the function runs it works perfectly, other times it cannot access the properties of the object
const tj = require('@mapbox/togeojson');
const fs = require('fs');
const gpxToJson = async function (trailSlug) {
// node doesn't have xml parsing or a dom. use xmldom
DOMParser = require('xmldom'...
1
vote
1
answer
1k
views
Single text label for a MultiLineString in MapLibre GL JS
I'm trying to display text labels for MultiLineString features in a geoJSON file using MapLibre GL JS. I'm using the symbol-placement: point option so I can see the labels on different zoom levels and ...
0
votes
1
answer
207
views
Extracting to center a GEOJSON object with D3js
It is showing the whole world projection boundaries, but is not showing the map of vietnam at the center. I will be creating multiple maps from humdata.org that and need each specified country maps at ...
0
votes
1
answer
234
views
Openlayers getFeatureById gives null
I faced the following problem: I compiled a usefull map with own generated geojson data, that's work fine. Now I want to make summary box next to the map, the data for summary text is from the same ...
5
votes
1
answer
594
views
React Mapbox GL: Only initial map is loading, not updating with fetched GeoJSON data
I'm working on a React application that utilizes Mapbox GL for displaying maps. I have a requirement to load GeoJSON data from a URL and update the map accordingly. However, I'm facing an issue where ...
3
votes
1
answer
1k
views
How to add custom icons to maplibre unclustered markers using filter
I am adding maker clusters using maplibre gl and when markers are unclustering, I want to add specific image to individual marker based on id present in properties of geojson of that feature.
https://...
1
vote
1
answer
1k
views
How to save WKT to postgres column with geometry data type using typeorm?
I have a table with a geom column which has the datatype of geometry. I need to save data into this table and the request being sent has the type wkt for this column. Currently there are some existing ...
1
vote
1
answer
1k
views
Can't render GeoJSON data React-Leaflet & Typescript
I've been trying to render GeoJSON data with React Leaflet & Typescript but can't seem to get it to work. I'm pretty sure my GeoJSON file is fine but typescript is complaining that is isn't the ...
1
vote
1
answer
173
views
convert geojson_geometry in json string to geodataframe
I have a string called "pois" obtained (from an API) like this:
[{'id': '1',
'name': 'Blah1',
'geometry_geojson': {'type': 'Point', 'coordinates': [-8.579082, 41.144294]}},
{'id': '2',
...
3
votes
0
answers
87
views
d3-geo coordinate in feature always returning true
I have a geojson file defined, and I am checking to see whether a coordinate is in the given feature inside that geojson file. No matter what coordinate I plug in to the d3.geocontains() function, ...
0
votes
2
answers
941
views
converting sf object to topojson
I am trying to create a list that is correctly formatted as topoJSON from an sf object.
What would work when reading a valid topoJSON file is:
sa <- jsonlite::read_json("https://raw....
0
votes
1
answer
193
views
How to append items from JSON dictionary and modify its structure to form a geoJSON dictionary acceptable in GIS software?
so it seems like a basic Python question and I assume it's a matter of placing some brackets in a proper place but anyway I've been sturggling for a while now without success.
I have a number of JSON ...
1
vote
1
answer
108
views
Displaying outline of municipalities where wind turbines are located
With this query, I get the outline of the department of Yonne in France and the points representing the wind turbines.
[out:json];
area["ref:INSEE"="89"]->.a;
rel(area.a)["...
0
votes
2
answers
1k
views
How to convert geopandas dataframe with multi-polygon into geojson?
I have a Geopandas data frame with multi-polygons geometries. Now, I want to convert the data frame into geojson. So, I have converted the dataframe into dict and then used json.dump(dict) to convert ...
0
votes
1
answer
560
views
Create rotated geo coordinate grid in python
For a project I have the lovely joy to create an equally spaced grid, to be placed on a map later in QGIS.
To this end, I created 4 reference coordinates, defining the top left corner as well as the x ...
2
votes
0
answers
55
views
GeoJson FeatureCollection field summary not accessible, indexing not working
In my Angular Application, I get some GeoJSON as type FeatureCollection from OpenrouteService.
Inside my ts file, I just assign the response from OpenrouteService so some variable:
import { ...