Stack Exchange Network

Stack Exchange network consists of 175 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

Hot answers tagged

4

It's not QGIS. It's the underlying GDAL library (I'm running 2.4). Your 1st geojson fails when read from a file saved to the filesystem. ogrinfo filepath/master/larsen_inflow.geojson # Fail ogrinfo filepath/larsen-inflow branch/larsen_inflow.geojson # Success However... the 1st geojson can be opened fine when read from a url ogrinfo https://<...


3

You could use shapely's affine_transform: import geopandas as gpd import rasterio as rio from shapely.affinity import affine_transform infile = "/tmp/test.geojson" outfile = "/tmp/out.geojson" raster = "/tmp/test.tif" df = gpd.read_file(infile) with rio.open(raster) as ds: t = ds.transform df.geometry = df.geometry.apply(lambda geom: ...


3

Hard to answer without more info. Getting the data from the DB will be about the same in each case. Converting it to an image (WMS) or GeoJSON will depend on the number and size of the features. Transmitting the data to the client will again depend on the size and number of features, for small datasets GeoJSON will be faster but for larger or more ...


2

Parameters passed to ogr2ogr flags are themselves parsed as string literals (and/or parsed to numeric types if needed); they don't require string enclosing (' or "), rather, consider them always getting enclosed implicitly. To explain the behavior: -select col1, col2 implicitly translates to "col1", "col2" thus -select 'col1', 'col2' will translate to "'...


2

https://github.com/woodb/geojsplit works for me. node --max-old-space-size=20480 /usr/lib/node_modules/geojsplit/bin/geojsplit -a 1 -l 3000000 -v -o ~/data ~/data/California.geojson I have divided California.geojson into four files with max 3000000 features per each. By default, node has only 512 Mb memory limit, so --max-old-space-size=20480 increase it ...


2

I think the assertion message reasonably explains the problem: The transform result may be 120,088.818 meters away from the expected position. Are you sure that the input coordinates are inside this map projection area of validity? The point is located 42°03.5'W away from the central meridian and 69°42.0'N away from the latitude of origin. The ...


1

ArcGIS REST Services can do the re-projection for you: use: http://maps.franklincountyauditor.com/fcaags/rest/services/BOEL/ElectionResults/MapServer/0/query?f=json&spatialRel=esriSpatialRelIntersects&maxAllowableOffset=38&geometry=%7B%22xmin%22%3A-9275174.760250824%2C%22ymin%22%3A4872401.931030698%2C%22xmax%22%3A-9255606.881009845%2C%22ymax%...


1

The most likely cause of this issue is that you have (inadvertently) swapped your lat/lon between the two runs. Without seeing the input to the spring run it's hard to be sure where the problem is occuring. It could be that spring is picking up a different gt-epsg-X module and ESPG:4326 has a different axis order defined in it. Another potential issue is ...


1

When Leaflet.markercluster plugin is added to framework template http://fulcrumapp.github.io/geojson-dashboard/, it doesn't work because this example uses old version of Leaflet (0.7). If newer version (1.4.0) of Leaflet is used, original code has to be modified at two places to make it work as it is (without marker clusters): // ESRI geocoder // before: ...


1

The earth is 360 degrees round. So if you add 360 to any longitude you get back to where you started from. Your example of "722.5350952148436,51.10007257240614" is probably double wrapped round the world, and the longitude should have 360*2 = 720 subtracted from it to get 2.535.... The creator may have messed this up when adding the French dependencies, or ...


1

The explanation from Michael is really good. In case somebody would like to disable the sanity checks of the library because the use-case allows a bit or imprecision, it can be done like this: import org.geotools.referencing.operation.projection.MapProjection ... MapProjection.SKIP_SANITY_CHECKS = true


1

Leave the time value in the coordinates, just as you would for GPX: var geojsonObject = { 'type': 'FeatureCollection', 'crs': { 'type': 'name', 'properties': { 'name': 'EPSG:3857' } }, 'features':[ 'type': 'Feature', 'geometry': { 'type': 'MultiPoint', '...


1

Here is the basic idea, set a style for the line, and set a style for the highlight, then in your forEachFeature function, set the layer on click to highlight. My example below resets the style in case, you clicked on one before. var highlight = { 'fillColor': 'yellow', 'weight': 2, 'opacity': 1 }; function forEachFeature(feature, layer) { ...


1

MySQL version 5.7 says: ST_IsValid() works only for the Cartesian coordinate system and requires a geometry argument with an SRID of 0. The geometries you created use an SRID of 4326. The behaviour changed for MySQL 8.0.


Only top voted, non community-wiki answers of a minimum length are eligible