Questions tagged [geospatial]
pertaining to the geographic location and characteristics of natural or constructed features and boundaries on, above, or below the earth's surface; esp. referring to data that is geographic and spatial in nature.
4,304
questions
1
vote
1
answer
31
views
R: Use real lon/lat values at x and y axis
I've generated the following chart with R:
library(rnaturalearth)
library(rnaturalearthdata)
library(ggplot2)
library(rworldmap)
library(scales)
library(sf)
library(mapdata)
library(maptools)
library(...
0
votes
0
answers
13
views
How to calculate distance between two lat/long coordinates in Java using JTS?
I have two coordinates with latitude and longitude, and I want to calculated the distance between them in meters/miles. Does the vividsolutions JTS library have the functionality to do this? If there ...
0
votes
0
answers
10
views
Time Series Machine learning/Deep learning with Multiple Geospatial data in Python
I have a Time series data from 1985 to 2020, with about 11 RASTER (Geo-spatial variable). Each variable has a time step of one month. meaning that each variable has 12 data raster data each year. One ...
0
votes
1
answer
15
views
When I convert the obtained road network data into a geodataframes structure, why does the list element appear in the highway column?
import osmnx as ox
G = ox.graph_from_place('成都市',network_type='all')
G = ox.project_graph(G)
ox.plot_graph(G)
# 将图形转换为节点和边的GeoDataFrames类型
gdf_nodes, gdf_edges = ox.graph_to_gdfs(G)
gdf_edges
So I ...
0
votes
0
answers
24
views
+50
Resample points in a Geodataframe so they stay equally spaced but inside area
I have a geopandas dataframe that contains a complex area and some Point objects representing latitude and longitue inside that same area, both reading from .kml and .xlsx files, not defined by me. ...
0
votes
1
answer
66
views
Linq .Distinct() add extraneous ordering
My entity has a computable geography::point column (represented by DbGeography type in code)
When I call a .Distinct() method on query for this entity it adds ORDER BY clause that's ordering by every ...
1
vote
0
answers
13
views
Extracting spatially IDW interpolated z-point data using specified x, y inputs?
I was able to do an IDW ppp spatial interpolation in respect to a Datum level based on corresponding longitude, latitude coordinates for a grid I've specified. Although I achieve the desired plot, I ...
0
votes
1
answer
13
views
Plot polygons with buffer of some radius using folium not working properly
I am trying plot the intersection between a buffer circle and the mesh blocks (or boundaries) within that circle of some radius (in this case, 80 km).
I got the intersection using sjoin() as follows:
...
0
votes
1
answer
24
views
Can't install geoplot package
I'm trying to install geoplot package for a few hours now but I can't understand why I can't do it. I saw several links in here just saying "only use conda and it will work" but neither ...
0
votes
1
answer
17
views
Save lat & lng values into point field in mysql
I have a table with fields latitude and longitude stored as float values, and I want to start saving them into points in a new column to use spatial features.
Currently, I have the values as following
...
1
vote
1
answer
22
views
geopandas reproject change the extent of the vector
Geopandas reproject changes the extent of the vector. Below is an example, you can download the vector file from here
# First please download the shp file
import matplotlib.pyplot as plt
import ...
0
votes
0
answers
11
views
Need to merge yield data for each GDMID with shape file and plot the map filled with yield
I am trying to plot an Indian district shapefile filled with modeled yield, corresponding to each GDMID, common in shapefile and .rds dataframe. I need to first merge the Yield data with respect to ...
2
votes
1
answer
28
views
intersection of two geopandas GeoSeries gives warning "The indices of the two GeoSeries are different." and few matches
I am using geopandas for finding intersections between points and polygons.
When I use the following:
intersection_mb = buffers_df.intersection(rest_VIC)
I get this output with a warning basically ...
0
votes
0
answers
17
views
Intersection of points and polygons using geopandas
I am using the Australian Bureau of Statistics data (ABS) to visualize meshblocks and boundaries of buffer data from a centre of location with certain radius.
I want to create the following plot:
...
0
votes
0
answers
15
views
MongoDb $near incongruent result on 1 meter variation of $maxDistance
I have set a 2dSphereIndex on a field named location, performing the same $near query with the smallest (1 meter) variation on $maxDistance leads to total different results:
First query:
db.collection....
1
vote
1
answer
52
views
How to create lines from ordered groupbyed points in BigQuery?
Reproducible setup
I have an (example) BigQuery table, project.table.geodata:
CREATE OR REPLACE TABLE `project.table.geodata` AS (
SELECT ST_GEOGPOINT(70., 12.) AS geometry, 'a' AS loc, 1 as ...
1
vote
1
answer
48
views
How to deal with the colorbar axis space in matplotlib subplots
I am plotting seven different parameters over four seasons, as shown in below image. but on last column (Post-Monsoon) sub_plots axis compromised with colorbar axis, that is really awkward!!
import ...
1
vote
0
answers
59
views
Azure CosmosDB MongoDB Api GeoSpatial queries not working
I have CosmosDB MongoDB-API instance.
Mongo server version = 4.0.0
Inserted documents look like:
{
"_id": "111",
"fileName": "some.txt",
"...
1
vote
0
answers
11
views
How to get all the objects in a table where the coordinates intersects with polygon with SQL Spatial Data
I have an SQL table which called DATAB which contains thousands of objects ordered by the following colunms:
[id] [angel] [latitude] [longitude]
And i have this polygon set with STPolyFromText:
...
0
votes
0
answers
26
views
Sources for Geospatial environmental / terrain / topographic classification
EDIT:
(11/05/22) Coastal classifications would serve a purpose at this stage if there exists such classifications based on NE co-ordinates. If anyone might be able to help?**
Forgive the framing of ...
0
votes
1
answer
36
views
Why Sql server returns 1 for STIntersects where it should return 0?
I have bunch of multipolygons records. Long story short, I have one point that belongs to just one multipolygon. When you visualise that with QGis or similar software that is correct. But sql server ...
0
votes
0
answers
61
views
Use convert UDT subtype to supertype
I use a user-defined type (UDT) in Oracle 18c called ST_GEOMETRY:
The ST_Geometry storage type
ST_Geometry in Oracle
SQL functions used with ST_Geometry
I have a query that produces a ST_GEOMETRY ...
0
votes
0
answers
17
views
Converting GeoTif to PGM(portable Gray Map) for Edge deduction
I have a spectral image (in tiff format). I need to do edge detection and for that, I need to convert my Image in PGM (Portable Graymap or Grayscale map).
I found many R or python scripts but all are ...
0
votes
1
answer
33
views
Spatial with SparkSQL/Python in Synapse Spark Pool using apache-sedona?
I would like to run spatial queries on large data sets; e.g. geopandas would be too slow.
Inspiration I found here: https://anant-sharma.medium.com/apache-sedona-geospark-using-pyspark-e60485318fbe
In ...
0
votes
1
answer
27
views
Coloring polygons (made with concaveman) in ggplot by column
I'm adapting code for a map made by someone else that uses a package concaveman to generate concave hulls from points. The goal is to plot a number of different polygons in the oceans, and to color-...
0
votes
2
answers
18
views
R terra remove raster cells touching spatvector lines
I'm trying to calculate shapes of touching raster cells within areas using terra. I haven't been able to reproduce my problem using sample data, so I hope someone might still be able to help without ...
0
votes
0
answers
25
views
How to do a double join: a spatial join AND an attribute join using sql query on DB manager of qgis?
I have a point layer and a polygon layer. The dots represent the stops of a bus line. The polygons represent a 10m buffer around the lines (split all 100m of bus line). I would keep counting and ...
0
votes
0
answers
17
views
mongodb $geowithin for multiple collections
I have a collection with geojson points. I have another collection with geojson multipolygons. How can I run $geowithin against all the boundaries in another collection?. Since the data is very large, ...
0
votes
1
answer
36
views
Plot points in google map with python with google api
I'm trying to plot some points on a map, and when searching on the internet, I found [this][1] tutorial with Google Maps and Bokeh library. The problem is that, after doing all the steps to get a key ...
0
votes
0
answers
40
views
Bind spatial data frames
I have a long panel dataset (Data_Base) with the name of the 32 states in Mexico through 28 years in time (928 obs). I have in another .rds file the spatial data for these 32 states (mex.sf), in total ...
0
votes
0
answers
15
views
Buffer country borders with st_buffer and a SpatialPolygonsDataFrame?
I'm using coordinate_cleaner's country test cc_coun but it's flagging entries with coordinates near to the edges country borders. To try to keep them I wanted to buffer the terrestrial area of ...
1
vote
1
answer
45
views
Matplotlib Contour/Contourf in Cartopy singularity at North Pole/ dateline
I am trying to produce heatmaps showing atmospheric attenuation values for a RF link to a satellite above the North Pole, but I have issues with the interpolation done by the Matplotlib contour/...
0
votes
1
answer
28
views
Create matrix showing proportion of overlap between many polygons
I have a list of polygons and I need to know the proportion of overlap of each combination of polygons. In other words proportion of over lap of poly1 to poly2, poly3,... and then poly2 to poly3, ...
0
votes
1
answer
21
views
Anonymize spatial data
I'm putting together some training materials for a workshop on R for spatial data analysis in archaeology, and need to anonymize the true site locations (confidential information) while keeping the ...
1
vote
1
answer
51
views
How to measure length of a section sf linestring inserted between two features from sf multilinestring object in r?
I have a dataset in linestring format and an ocean bathymetry multilinestring (several lines with depth information). My aim is to measure the length section of these linestrings at each depth range (...
0
votes
0
answers
14
views
Run mongodb $geowithin on array field of geojson points rather than single document with single geojson point
If collection has a location geojson in all its documents like
{
"owner": "1234141341"
"location": {
"type": "Point"
"...
0
votes
0
answers
24
views
How to do a proximity analysis in R with multiple individuals?
I have a large data set of GPS coordinates for both deer an cattle. My ultimate goal is to identify if deer and cattle are interacting. I have used prox() in the wildlifeDI package to report fixes ...
0
votes
0
answers
27
views
Folium - Label each area in a GeoJSON
I have a GeoJSON file that contains country/empire borders in the year 1800. I am trying to depict this using Folium. I would like to have the name of each country/empire to be displayed (text) within ...
0
votes
0
answers
40
views
Trying a data frame to an sf object, function used: st_as_sf()
I am trying to execute following code as .R file in Azure batch service:
Data <- st_as_sf(data, coords = c("Longitude", "Latitude")) %>% sf::st_set_crs(4326)
and I am getting ...
2
votes
2
answers
67
views
Count number of times that sf linestrings intersect grid cell in r
Consider a set of linestrings and a polygon grid (sf geometry):
library(sf)
#creating data example
id <- c("844", "844", "844", "844", "844","...
0
votes
0
answers
27
views
Batch geocoding street intersections in R
I am currently working with data that is formatted like this:
tribble(
~street1, ~street2, ~county, ~state
N BENTON WY, W TEMPLE ST, LOS ANGELES, CA,
11TH PL, BLAINE ST, LOS ...
0
votes
0
answers
11
views
How to add a column on a shapefile in GRASS
I'm relatively new in grass gis and I want to add a column in a shape file. I'm using the shape file of the biogeographical realms. In this file the realms are identified in the column REALM with a ...
0
votes
0
answers
84
views
Can't Install Package "sp"
I am new to geospatial analysis in R as all of my previous experience is in bioinformatics work. I am attempting to install some of the basic geospatial packages, but am having some issues, ...
0
votes
0
answers
18
views
Calculating the cosine of latitude as weights for reanalysis data in r
I am currently trying to calculate "weighted" spatial daily values for pressure using era5 data. This is due to the size of the area being represented differently towards the poles relative ...
0
votes
1
answer
20
views
Is there a way to calculate nearest lat_longs and then club them together in python?
What I want to do is to calculate and club those lat_longs into a single lat_long that have a haversine distance smaller than 1km and push them into a list and also those lat_longs that do not have ...
1
vote
0
answers
20
views
R: Selecting a transformation approach/pipeline using a recommended grid
When using the R package “sf” to reproject a shapefile from WGS 84 to EPSG:7991 (NAD 27 MTM 10) is there a way to specify a particular transformation and grid? I know that the new-ish function ...
0
votes
2
answers
40
views
Why am I losing columns when extracting raster data with ```terra::extract```?
I created a raster stack with rasters containing different vegetation measurements (i.e., canopy height, veg density). I extracted data from that raster stack to a SpatVector containing GPS points and ...
0
votes
1
answer
26
views
How to extract values of a raster stack into separate columns?
I have rasters of different vegetation measurements (i.e., canopy height, veg density). I want to stack the layers and use dplyr to extract values and assign to different columns. How can I do this? ...
0
votes
0
answers
24
views
Mapping Multiple Species Ranges using Alpha hulls
I am trying to plot various species' ranges using alpha/concave hulls to create a map with a filled-in shape that represents that species range in the United States.
I have tried to do this multiple ...
0
votes
1
answer
31
views
BigQuery clustering on geography and other columns
I've got a couple hundred million records across the US clustered on a state/county FIPS code column (3K separate values) followed by a Geography column. Until I added the clustering, spatial joins ...