gis

How to configure PostgreSQL with Postgis to calculate distances

时间秒杀一切 提交于 2020-07-10 01:56:34
问题 I know that it might be dumb question, but I'm searching for some time and can't find proper answer. I have PostgreSQL database with PostGIS installed. In one table I have entries with lon lat (let's assume that columns are place, lon, lat). What should I add to this table or/and what procedure I can use, to be able to count distance between those places in meters. I've read that it is necessary to know SRID of a place to be able to count distance. Is it possible to not know/use it and still

MapBox ESRI Data Layer

谁说胖子不能爱 提交于 2020-07-08 02:44:01
问题 I have a mapbox, and want to display a layer of esri data onto it. The data I'm getting is being pulled in from this json file: https://gis.usps.com/arcgis/rest/services/EDDM/selectZIP/GPServer/routes/execute?f=json&env%3AoutSR=102100&ZIP=93003&Rte_Box=R&UserName=EDDM The data['results'][0]['value']['features'] array looks something like this: [{'attributes': {'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}, {'attributes': {'key':'value'}},{'geometry':{

MapBox ESRI Data Layer

谁说胖子不能爱 提交于 2020-07-08 02:43:19
问题 I have a mapbox, and want to display a layer of esri data onto it. The data I'm getting is being pulled in from this json file: https://gis.usps.com/arcgis/rest/services/EDDM/selectZIP/GPServer/routes/execute?f=json&env%3AoutSR=102100&ZIP=93003&Rte_Box=R&UserName=EDDM The data['results'][0]['value']['features'] array looks something like this: [{'attributes': {'key':'value'}},{'geometry':{'paths':[[-13273770,4064608],[-13273762,4064613],....]}}, {'attributes': {'key':'value'}},{'geometry':{

java.io.StreamCorruptedException: invalid stream header: 30313031 [duplicate]

江枫思渺然 提交于 2020-07-06 20:04:08
问题 This question already has answers here : java.io.StreamCorruptedException: invalid stream header: 54657374 (2 answers) Closed 14 days ago . This relates to Hibernate: Could not deserialize - invalid stream header. I could not make real use of the answers so I am creating this again (and maybe things have changed a bit). I am building a SpringBoot application and here are the libraries I use. org.springframework.boot:1.5.4.RELEASE hibernate-core:5.0.12 hibernate-spatial hibernate-jpa-2.1-api:1

java.io.StreamCorruptedException: invalid stream header: 30313031 [duplicate]

耗尽温柔 提交于 2020-07-06 20:00:06
问题 This question already has answers here : java.io.StreamCorruptedException: invalid stream header: 54657374 (2 answers) Closed 14 days ago . This relates to Hibernate: Could not deserialize - invalid stream header. I could not make real use of the answers so I am creating this again (and maybe things have changed a bit). I am building a SpringBoot application and here are the libraries I use. org.springframework.boot:1.5.4.RELEASE hibernate-core:5.0.12 hibernate-spatial hibernate-jpa-2.1-api:1

r - Convert output from sf::st_within to vector

吃可爱长大的小学妹 提交于 2020-07-06 12:33:50
问题 Im trying to use the sf package in R to see if sf object is within another sf object with the st_within function. My issue is with the output of this function which is sparse geometry binary predicate - sgbp and I need a vector as an output so that I can use the dplyr package afterwards for filtering. Here is a simplified example: # object 1: I will test if it is inside object 2 df <- data.frame(lon = c(2.5, 3, 3.5), lat = c(2.5, 3, 3.5), var = 1) %>% st_as_sf(coords = c("lon", "lat"), dim =

How to fill water bodies with OSMnx in Python

♀尐吖头ヾ 提交于 2020-06-29 04:08:11
问题 I currently use OSMnx for a project to draw road networks in an area. I'd now like to add water bodies so that we can clearly see which parts of an area are water and land. So far, I've been able to identify waterbodies using the custom_filter argument to OSMnx's graph functions. I can then outline the waterbodies using the plot_graph function. Ideally, I'd want to fill the waterbodies in (rather than only outline them). I feel like this should be possible, as in OpenStreetMap water bodies

return list of points within polygon geopandas [duplicate]

左心房为你撑大大i 提交于 2020-06-17 13:08:40
问题 This question already has answers here : Link each point in one GeoPandas dataframe to polygons in another dataframe (2 answers) Closed 19 days ago . I have a shapefile of London with over 4000 unique polygons representing lsoa areas. I have also created a geodataframe of points representing sensors in the city. I need to work out which lsoa area (ie which polygon) each sensor belongs to/is within. So ideally I would have a list of each sesnsor_id_location and their respective lsoa number

return list of points within polygon geopandas [duplicate]

[亡魂溺海] 提交于 2020-06-17 13:05:43
问题 This question already has answers here : Link each point in one GeoPandas dataframe to polygons in another dataframe (2 answers) Closed 19 days ago . I have a shapefile of London with over 4000 unique polygons representing lsoa areas. I have also created a geodataframe of points representing sensors in the city. I need to work out which lsoa area (ie which polygon) each sensor belongs to/is within. So ideally I would have a list of each sesnsor_id_location and their respective lsoa number

return list of points within polygon geopandas [duplicate]

一笑奈何 提交于 2020-06-17 13:04:58
问题 This question already has answers here : Link each point in one GeoPandas dataframe to polygons in another dataframe (2 answers) Closed 19 days ago . I have a shapefile of London with over 4000 unique polygons representing lsoa areas. I have also created a geodataframe of points representing sensors in the city. I need to work out which lsoa area (ie which polygon) each sensor belongs to/is within. So ideally I would have a list of each sesnsor_id_location and their respective lsoa number