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
29 views

GeoJSON matching, changing color and zooming element in OpenLayers?

I'm trying to look for matching in the geosynthe loadloaded on openlayers when a user clicks on a button in that table then the button sends the element id and I want to color it in another color and ...
2
votes
0answers
77 views

Converting GeoJSON file to vector tiles

I need to display huge GeoJSON file using OpenLayers. So I decided to use VectorTiles. Library geojson-vt.js works perfectly for me, but unfortunately it requires my GeoJSON file to be preloaded on ...
1
vote
2answers
57 views

Why is the order of my features changed when using readFeatures in OpenLayers v4.6.5?

I have a geojsonObject that is a featurecollection of X number of features. see picture I Then add this to a vector: var Source = new ol.source.Vector({ features: (new ol.format.GeoJSON())....
0
votes
0answers
21 views

Consume a GeoJSON service from GeoServer in QGIS 3.4?

It seems there has been an update to the way QGIS consumes GeoJSON files in version 3.4x At 2.18.x, a WFS service with GeoJSON output from GeoServer such as: https://server.org/geoserver/datastore/...
2
votes
1answer
46 views

Set default coordinate precision

Is there a way to set the default coordinate precision to 7 for GeoJSON files in QGIS? This would help me save time when I go to save files.
0
votes
0answers
54 views

Python - Issue to create choropleth map based on GeoJSON file: AttributeError

I'm trying to build a choropleth map, I cannot figure out why I get this error: AttributeError: 'NoneType' object has no attribute 'get' Here is my code: station_nb is a dataframe with values ...
3
votes
0answers
67 views

Why an extra iteration on the first feature of a GeoJSON layer?

I'm using Python and GDAL to iterate over the features in a GeoJSON layer and I'm seeing this strange behavior where the first iteration is repeated a second time before moving onto the next feature. ...
0
votes
1answer
24 views

Format GeoJSON use Join method before export in Earth Engine

After filter an LANDSAT-05 for an small area var Collection = function(pixel) { var colForPixel = ee.ImageCollection('LANDSAT/LM05/C01/T1') .filterBounds(pixel) .filterMetadata('CLOUD_COVER','...
1
vote
1answer
62 views

Mimic in-line GeoJSON using fetch()

For simplicty, referencing this example: https://carto.com/developers/carto-vl/examples/#example-load-external-geojson-layer I would like to have this bit of code behave the same as through it were ...
2
votes
1answer
29 views

Get geometry type from Feature Collection for every row

I want to get geometry type for every row (like point, linestring, polygon etc.) from GeoJSON data. This is my code for reading data. import argparse import geopandas as gpd import os import sys ...
1
vote
1answer
23 views

Using custom marker name in Leaflet from external GeoJSON file

I have the following code (which works great): <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" integrity="sha512-xwE/...
1
vote
1answer
56 views

Exporting GeoJSON from PostGIS?

I am, trying to export GeoJSON from postgis. I am using the following code which is working local machine but when I am trying to use this in a server the following error is occuring CODE: ogr2ogr ...
0
votes
1answer
38 views

Using getmapasync() function instead of getmap() function in Android to plot GeoJSON file?

This is the code that I have used to plot GeoJSON file in Google Maps in Android: mMap = googleMap; SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() ...
1
vote
2answers
72 views

Convert GeoJSON directly to geodatabase

I'm looking for a way to convert a GeoJSON File (from overpass-turbo.eu) directly into a Feature Class in an Esri geodatabase. Normally I'm doing this by loading the GeoJSON into QGIS, Export it to a ...
2
votes
1answer
58 views

Non-interactive points in Leaflet

I do have a point layer (data from a GeoJSON) and a polygon layer (also GeoJSON) in Leaflet. Both layers are created the same way and I made both layers "non-interactive". Unfortunately the point ...
1
vote
0answers
26 views

Transformation issue with SVG to GeoJSON conversion

I have a vector image in SVG format. (without georeferences) I am trying to display it using OpenLayers to display properties of different polygons in it. I tried converting it to GeoJSON but the ...
0
votes
0answers
41 views

SVG to GeoJSON conversion - incorrect render [duplicate]

I have a vector image in SVG format.(without georeferences) I am trying to display it using OpenLayers to display properties of different polygons in it. I tried converting it to GeoJSON but the ...
2
votes
1answer
72 views

Access geometry.coordinates of sliced vector grid

I am trying to represent LineString GeoJSON as vector tile layer using Leaflet.VectorGrid. But i need to do some interactive by clicking on vector tile layer. but this vector tile layer has came with ...
2
votes
2answers
63 views

Setting Labels on Vector features in OpenLayers 5

I am following this very big example to set labels on the style of the vector but it's confusing. The labels should be the Plot numbers, of each feature, which come from the JSON file. Also i have ...
1
vote
1answer
102 views

Manipulating polygon data imported from Google BigQuery GIS within R

I have some polygon shapefiles (representing UK postcodes) which I have uploaded to BigQuery, using this guide, hoping to take advantage of the inbuilt GIS support described here. I am trying to ...
0
votes
0answers
27 views

Import GeoJSON in QGIS with file name as layer name?

When I add a GeoJSON layer to my QGIS project, it always gets the name "filename name_field_value". For example, file named CZ0100554782.geojson is as layer in QGIS named "CZ0100554782 Praha" I ...
2
votes
1answer
63 views

GeoJSON files being saved without line breaks

Why are my GeoJSON files being saved without line breaks? Why are they missing the proper formatting? All features in the file are being saved in the same line. I'm using QGIS 3.6.3. Here is what I ...
1
vote
0answers
50 views

Blur all other area outside polygon in mapbox-gl

I am trying to create an effect like Can view it by adding feature from fiddle in http://geojson.io/#map=14/46.9597/7.1446 when added the feature in mapbox as geojson layer of mapbox-gl I am getting ...
0
votes
0answers
28 views

Convert Mapbox vector tiles to GeoJSON in browser

Although Mapbox's vt2geojson is fine for node use, I need to convert vector tiles to JSON in the browser. I haven't found a browser based solution for this. Is there one? Possibly the solution is ...
0
votes
2answers
38 views

Using ogr2ogr for converting tables from non-public schema to GeoJSON

I've used ogr2ogr to convert tables in PostgreSQL database to GeoJSON which works fine for the public schema. The question is how can I set the schema to non-public to access my tables? I've already ...
0
votes
0answers
32 views

Creating shapefile/GeoJSON from CSV with zip codes

I have a CSV file containing zip codes to territory code mapping. I would like to create a map showing the boundaries of the territories as either a shapefile, GeoJSON, or TopoJSON. I was able to ...
1
vote
1answer
57 views

Join a CSV file to GeoJSON using ogr2ogr in a Python script?

I have a CSV which I would like to join to a GeoJSON. I found this answer which I tried to implement but I can't get it to work just yet. Here's an extract of my python: join_command = ['ogr2ogr', '...
-1
votes
1answer
36 views

Converting ArcGIS Polygon data to Lat/Long? [closed]

I have downloaded some ArcGIS data from here: ArcGIS Data and there is an explanation of the schema here: ArcGIS Data Documentation How do I convert the values in the array to lat/long? i.e. Here'...
3
votes
1answer
79 views

Re-project GeoJSON from pixel-space to lat-long in Python

I have created a GeoJSON of linestrings in pixel space using Python. However, I now need to re-project the file to match the same projections and extent of the .tiff file I wish to layer the GeoJSON ...
0
votes
1answer
81 views

Which is more performant GeoJSON or WMS/WFS using OpenLayers? [closed]

I'm developing a web application using PostGIS, Laravel, Vue.js and Openlayers, for the moment I generate the GeoJSON from my database using the following code : public function plosWithGeom() { ...
2
votes
0answers
37 views

Creating GeoJSON REST service

I'm trying to create a GeoJSON REST service from a PostgreSQL connection. First I fetch GeoJSON as a string from PostgreSQL: import java.util.*; import java.sql.Connection; import java.sql....
1
vote
1answer
43 views

Checking if GPS coordinate is in country polygon

In order to check in which country GPS coordinate is in, I've found this github repo, where there is GeoJSON file for each country. I've loaded the files to geojson.io, and they seem very accurate. ...
1
vote
1answer
51 views

GeoJSON layer shows/enables only one row in attribute table in QGIS

I have a GeoJSON polygon layer which I converted from a shapefile layer. The layer opens up in geojson.io, for example, with no problem, displays the table correctly, etc: However, in QGIS the ...
-2
votes
1answer
57 views

WFS display problem using GeoServer and OpenLayers

I know a lot of issues have already been posted about this tricky situation, but I can't figure out where is the problem in my script and most of the discussions about OpenLayers are outdated. I'm ...
0
votes
0answers
42 views

Leaflet display PHP data on GeoJSON popups

I want to display data from my database which I get in JSON format with getJSON function. I want to display these data on all GeoJSON features based on a condition. I am trying to do that with the ...
0
votes
0answers
63 views

How convert OSM relation to GeoJSON -based all kind of relation member roles

I just want to convert OSM data to GeoJSON where it is pretty simple with node and way tags of OSM data, but relation which is giving complex can't find the logic to convert OSM relation to GeoJSON ...
3
votes
3answers
71 views

Projection fails when ran with assertions enabled [closed]

The following minimal example runs fine only when assertions are disabled: src/main/kotlin/main.kt: package com.regions import org.geotools.geojson.feature.FeatureJSON import org.geotools.geometry....
0
votes
0answers
7 views

QgisGeoJSONExportPlugin won't install

I'm trying to download and install the Plugin "QgisGeoJSONExportPlugin" I downloaded from the "QGIS Python Plugins Repository", since I couldn't find on the "manage and install plugins" window. So I ...
0
votes
1answer
194 views

How to cluster markers using the “Geojson-dashboard” in Leaflet JavaScript

I know how to use Leaflet.markercluster, but for some reason I can't use with geojson-dashboard framework template for Leaflet (http://fulcrumapp.github.io/geojson-dashboard/). But I have a simple ...
0
votes
0answers
46 views

Opening geodata in GeoPandas?

I've downloaded some geodata but I'm unable to import it into GeoPandas. This is a sample of the geodata (I've trimmed the JSON object): {'displayFieldName': 'NAME', 'fieldAliases': {}, '...
0
votes
1answer
43 views

Unreadable GeoJSON file in QGIS fixed by trivial reordering

I'm having a problem reading a GeoJSON file in QGIS. The file can be found at this git repository. When I try to load in the file, I get an error message that it's invalid, but the "Reason:" field is ...
0
votes
0answers
23 views

Interpolating timestamps for breakpoints for linestrings of GeoJSON

I have a GeoJSON file containing a couple of LineStrings. The properties contain the Departure and Arrival timestamp for each LineString. I would like to interpolate the timestamps for each breakpoint ...
0
votes
0answers
16 views

Google Labelled Places (Pins) into KMZ or Shapefile

I hope this isn't a redundant question as I tried searching and trying several things to fix my problem, but here it is: My coworker dropped a bunch of pins in Google Maps, hoping that I could get ...
0
votes
1answer
67 views

How to get individual features from a GeoJson-Multipoint feature using map.on('click'…) in openlayers 4.6.5

I'm trying to get the features of each MultiPoint-point when i click on a point in my openlayers map (4.6.5). The points shows on the map. I want to add a pop-up on each feature when i click on the ...
0
votes
1answer
45 views

Leaflet 'Click' event on line portion

I have a polyline as GeoJSON layer in Leaflet. I need a JavaScript event when the user click on the portion of the line. I have to highlight the selected line segment. Is it possible this?
0
votes
0answers
20 views

In Leaflet is uGeoJSONLayer the correct approach to get smaller amounts of Point data from GeoDjango?

I have a GeoDjango model containing a PointField. There are about 200,000 records spread over a large area. We view these records with Leaflet. The data only has relevance at a small scale (zoom level ...
0
votes
1answer
32 views

PostGIS: unable to import GeoJSON data (selected attributes) to PostgreSQL database using ogr2ogr

I downloaded sample OSM data of my area of interest via Overpass-turbo as my_map.geojson. I am trying to import this geojson file to my PostgreSQL 10 (Windows 8 x64 machine) database using ogr2ogr (...
0
votes
0answers
49 views

Creating and saving OpenStreetMap locations within GeoJSON file?

I am not experienced in working with OpenStreetMap, but I am wanting to collect points. All points that the user collects will be saved inside a GeoJSON file, however whenever I use this, the file is ...
0
votes
2answers
166 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
0answers
55 views

ogr2ogr: How to export / explode GeoJSON features from collections into separate files

I would like to use an ogr2ogr command to export features as multiple separate geojson files from a single GeoJSON feature collection. I have tried using the -explodecollections command but I am ...