Questions tagged [geospatial]

Geospatial pertains 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.

Filter by
Sorted by
Tagged with
1
vote
0answers
31 views

code plots - spatial data

I am an absolute newcomer in R. For my bachelor thesis I worked with spatial data. I did many plots with the normal "points"-function. I already have my results, but would like to improve my code. ...
3
votes
0answers
32 views

Accurate && precise location data within a timeframe (session)?

Scenario A session would start & end within a time frame. Within this time frame, the device would be moving within a constraint environment. The movement would be extremely slow (slow-walking ...
2
votes
1answer
32 views

Reload polyline midpoints into parallel tables

I have an Oracle GIS database that has spatial tables. The records in the spatial tables have a geometry column that contains polylines. I've written a Python 2.7.16 script that calculates the ...
6
votes
2answers
236 views

Angular control for inputting latitude and longitude with validation

I've built a custom control to handle user input in a human-readable format, but save in a machine-format. It needs to have input validation, and to convert UI-input to a base format. I'm interested ...
1
vote
1answer
55 views

Work order spatial query (Part 2)

Part 2: Error Handling (and anything else that can be improved) (Part 1 focused on general cleanup.) I received this comment in an unrelated post (thanks @Milton): ...Since it is obvious you are ...
6
votes
1answer
89 views

Graphing refugee movements using plotly in Python

I've created a simple data visualization in python that shows the movement of refugees around the world. The code works but I feel it is a bit slow. it takes about 10 s (on my hardware at least) to ...
6
votes
1answer
113 views

Work order spatial query (Part 1)

Part 1: General Cleanup (Edit: Part 2 is here.) I have a script in a Work Order Management System (Maximo) that performs a spatial query. Details: Takes the X&Y coordinates of a work order in ...
4
votes
0answers
67 views

Python program for address normalization and geocoding

This is a school project I have been working on. I have created a program utilizing Tkinter, and I was hoping to get some feedback on the way I have gone about things. I feel like it is pretty messy ...
13
votes
5answers
803 views

Converting Geographic Coordinates into Lambert2008 coordinates

This is part of a game made in Unity3D. I wrote this class to convert geographic coordinates into lambert 2008 coordinates based on this reference document: http://www.ngi.be/Common/Lambert2008/...
6
votes
1answer
68 views

Get nearest major city of an image (using EXIF GPS data)

I am writing a program that will take images in a folder, get the GPS Coordinates (from the EXIF data), then return the closest "major city". (I define a major city as one with an airport, so ...
6
votes
3answers
319 views

Finding the nearest agents to a customer using IComparable

I got a C# class: ...
3
votes
1answer
252 views

Aggregate Pandas Columns on Geospacial Distance

I have a dataframe that has 3 columns, Latitude, Longitude and Median_Income. I need to get the average median income for all points within x km of the original point into a 4th column. I need to do ...
10
votes
1answer
116 views

Convert British and Irish National Grid references to or from WGS84 geodetic coordinates

I've been using this wgs84togrid program for a few years. It converts in both directions between National Grid coordinates for GB or Ireland (beginning with a ...
0
votes
1answer
40 views

Analyzing distances between clusters of orders [closed]

I wrote the Python class below, which does what I want it to do, but the data structure is a mess. Was wondering if there was a better structure I could use to get the same results but with better ...
5
votes
1answer
123 views

Python toolbox for OpenStreetMap data

Background My project is a Python toolbox. This is my first bigger coding project and it took me quite some time to code this toolbox. I learned a lot from the start point to this day. I changed this ...
1
vote
0answers
397 views

Wrap location API in coroutines

In my app I need to query location and scan wifi periodically. To conserve power I need to change the rate dynamically, depending on the distance to the target. Also I want to wait for both ...
5
votes
1answer
78 views

Rate-limited geographic data lookup

I'm looking for a code review of this python I wrote - this code reads the zipcode column value from a CSV file and calls an API to retrieve lat, long, state and city info. It works fine and gives me ...
10
votes
2answers
163 views

Where is the most desolate place in Colorado?

The Story While flying a plane over the forests of Wisconsin a couple years ago, I thought to myself "If I lost an engine, I would be awfully long way from an emergency landing airport. I wonder ...
2
votes
1answer
48 views

ProcessPoolExecutor KMZ file search

I've written a script to look for coordinates in KMZ files. I've tried to speed execution up using the ProcessPoolExecutor. I'm quite new to Python, so any recommendations are more than welcome. <...
2
votes
1answer
51 views

Javascript class to geocode Dutch addresses

I am relatively new to javascript ES6, the code I've written is working fine. However I am curious if this would be the best approach. I am trying to write a reusable module that I can use in multiple ...
3
votes
0answers
1k views

Function to calculate distances and nearest points between 2 GeoPandas dataframes

I have 2 geoPandas frames and want to calculate the distance and the nearest point (see functions below) from the geoSeries geometry from dataframe 1 (containing ...
4
votes
2answers
125 views

Find SuburbName from latlong or location

I have create one class and interface for finding SuburbName based on Location or LatLong coordinates. My interface ...
2
votes
1answer
69 views

Finding the nearest defibrillator exercise from CodingGames

For my first attempt at Scala I decided to solve a simple exercise on codingame.com. Based on a string input containing the user location, the defibrillators count and a list of defibrillators ...
4
votes
2answers
3k views

Convert geodetic coordinates to geocentric (cartesian)

I'd like to retain as much float precision as possible without having to resort to specialized libraries so I need this code to work with only standard modules. I'm doing this in QGIS where ...
7
votes
2answers
237 views

Function to find user's region based on GPS coordinates

I've made an algorithm/ function to get a user's region based on their GPS coordinates. It primarily looks for big cites and counties for the region and the state for the outer region eg. orange ...
2
votes
0answers
114 views

Determine the country by an IP

EDIT: I have updated the code, if you have comments about the previous version of the code, please do post them anyway. The task is to determine the country by an IP. Provided programme queries two ...
1
vote
0answers
81 views

KNN search by distinct category in postgis/postgres

I have a postgres table, etablissements with millions of rows, and a geom (st_point) column , spatially indexed (using gist). I'...
1
vote
0answers
73 views

Writing a table of national park data

I'm working to produce a Lookup table using the Arcpy module that contains descriptive statistics for US National Parks. The original data, found in tbl, has 12 ...
1
vote
1answer
49 views

vectorize 2D gradient with spatially varying bins

The following code takes in some values ssh and solves the equations for the geostrophic motion (slide 8 here). The main part of the code is the computation of the ...
4
votes
0answers
282 views

Generate NDVI Rasters from USGS EarthExplorer Landsat 8

I've written the following using Python Dictionaries and Pathlib Module. I'd like to improve the first function: list_landsat_bands. I've created a list of file patterns to match, which I then use ...
1
vote
0answers
362 views

Log visitor info like latitude, longitude to a database

I am collecting each visitor information like ip, lat, longitude, referrer and language and save it into db, then in db I have column in table with counter that increment if user revisits the web site ...
4
votes
1answer
326 views

DBSCAN “region query” too slow; implement a tree?

My current DBSCAN in Python works...but its indexing is far too slow; its a linear scan: ...
7
votes
1answer
777 views

PANDAS nearest site algorithm

I have got CSVs full of property transactions in the UK from 1995 to 2017, separated by year such as "RS2015.csv". I have a 2nd CSV with a list of wind turbines in the UK. Both have coordinates in WGS ...
1
vote
0answers
32 views

Efficient backend for finding nearby properties

I am thinking of building an app based on location for finding nearby properties around 15 km from the location of the user. I am a beginner in Django and for such use case I could code the following ...
8
votes
3answers
1k views

Mask latitude text field

I have an input element on one of the pages. This input is supposed to take a string of digits from a user. In order to enhance UX I'd like to mask input's value at any given time. Like so: What came ...
4
votes
3answers
351 views

Methods for calculating the distance between Polish postal codes

Let's consider we are a company who sells our products for other companies. In the programme the actors are an Agency (agencies of our company, we have a few in the ...
3
votes
1answer
178 views

Set time zone from cookie

Is the set_cookie variable the correct way to signal that the cookie should be set? It does not seems pythonic to me: ...
-1
votes
1answer
36 views

Count buffered streets that intersect buffered points using PostGIS

PostgreSQL 9.5.1 with PostGIS 2.0 extension This first section creates an intersection (clip) of the streets from another polygon (MTC15), then it buffers the intersection: ...
-1
votes
1answer
37 views

Function to classify address as EU or non-EU

LeadDetails class: ...
3
votes
0answers
122 views

Get nearest driver from 2.5 millions of data using mongodb

I have created 2.5 millions drivers dummy data, in this case lets say the drivers are moving around in the city. The driver's document look like this : ...
5
votes
1answer
690 views

Laravel Pagination with haversine formula in it

I'm using the haversine formula to count distance from selected post-code to desired destination. I have the following scope in ...
5
votes
3answers
174 views

Haversine Formula in Clojure

I implemented the Haversine formula to calculate the distance between two (latitude, longitude) coordinates. I was wondering if it looks natural to Clojure programmers. What could be improved? <...
1
vote
2answers
160 views

Generate new latitude and longitude in decimal

I have created simple algorithm to generate the new Location from given latitude and longitude. ...
7
votes
1answer
227 views

Raster processing for climate change model

I am working on a project on how climate change may affect the development of spruce budworm larvae throughout each year (historical and projected) using different climate change models and emission ...
4
votes
1answer
3k views

PANDAS code for calculating distance between waypoints

I've written some python code designed to take a csv of waypoints for a series of trips, and calculate the distance of each trip by the sum of the distance between the waypoints. An example csv might ...
6
votes
1answer
149 views

Calculating areas of map features

I am developing a plugin for QGIS (a Geographic Information Systems) software which uses Python. I have calculated four areas of interest, it does this by identifying each feature on the map (called <...
2
votes
0answers
135 views

Reduce sample rate of GPS data based on distance between points

The algorithm needs to reduce an RDD[GPSRecord] based on the distance between several points, e.g. "give me only GPS records when the distance between them exceeds ...
2
votes
1answer
180 views

Arcpy script to check for TIFF files and add them to different lists

My script goes through sub folders in my main directory and based on a wildcard checks if a tiff file exists or not, if it exists then the file path is appended to the corresponding list. For example, ...
1
vote
0answers
72 views

Extract climate variables on species range from worldclim and save into CSV

My code is currently taking too long to extract climate variables from the worldclim dataset. I would like to download the climate data from the link and find the maximum temperature over my species ...
3
votes
1answer
130 views

ArcPy script to analyze land use in counties

We have written a Python script using arcpy modules. It is was written by Python beginners and many parts of the code are written in 'unpythonic way'. The goal is ...