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.

learn more… | top users | synonyms

12
votes
3answers
1k views

Find my colleagues

I recently finished the Using Databases with Python course. To figure out whether I really understood what was being taught, I build an application which does roughly the same but uses a different ...
12
votes
1answer
304 views

Temperature Interpolation

I want to interpolate temperature in correlation with height. I have temperature data from stations with coordinates and height in this format: ...
11
votes
3answers
233 views

Geographic search

I have this table (inradar_ad) with almost 300k entries. I want to know why my query takes 160 secs to run. I tried limiting with ...
11
votes
1answer
90 views

New Moon (not Twilight) Calculator

Photography is one of my hobbies, and, living in Canada, I have the possibility of seeing, and photographing, the Aurora Borealis (Northern Lights). Now, these happen when there's ionization in the ...
9
votes
3answers
211 views

Composing QGIS expression based on a QGIS layer tree

I am developing a plugin for a GIS (Geographic Information Systems) software which uses Python. I have been using Python for over a year (on-off) and have the following code which works. It basically ...
9
votes
1answer
1k views

Spherical Voronoi diagram, binary splitting approach

Given 5 (currently hardcoded) cities, this code uses Google Maps to split the world into 5 regions, each region being the points closer to a given city than to the other 4. It works, but is slow in ...
8
votes
1answer
232 views

Optimize web-scraping of Moscow grocery website

This code works fine, but I believe it has optimization problems. Please review this. Also, please keep in mind that it stops after each iteration of the loop ...
7
votes
2answers
16k views

Simple application for finding local restaurants

I was asked to create a test APK file by a company HR when I applied for an Android developers job, Specification: The goal is to develop a simple application which finds the local restaurants. ...
7
votes
1answer
145 views

Extracting nodes from a road network

My code takes 143.023 seconds for extracting nodes from a road network of city like Göteborg in Sweden. Please check it out if I can optimize it. ...
7
votes
1answer
46 views

Finding closest points without duplicates and given distance threshold

Given a bunch of latitudes and longitudes stored as Points, I would like to determine the points that are closest to each point given some maximum threshold in meters. This is my first stab at this: <...
7
votes
1answer
77 views

Querying houses similar to a given house

I was given this task as an interview coding challenge and was wondering If the code is well structured and follows Python guidelines. I chose to sort the houses based on a similarity metric and then ...
6
votes
1answer
995 views

Bash script for getting geolocation (latitude, longitude and country code)

I have a bash script, where I need to get the user's geolocation (latitude, longitude and country code). If a GPS device is present, I use gpspipe. But a lot of laptops/computers don't have GPS ...
6
votes
2answers
569 views

Python program to check if a set of points is at land or at sea

I have written a program that divides an geographical area up in cells with size 0.002 degrees longitude by 0.001 degrees ...
6
votes
2answers
143 views

Accepting user defined functions for custom map reduce functionality in C++

I am implementing map and reduce - style functions for processing geospatial raster datasets. I would like the ...
6
votes
2answers
580 views

Compute spherical distance matrix from list of geographical coordinates

I've got a list of geographic coordinates ([lat, long]) and want to compute the corresponding matrix of distances. Distance shall be spherical distance in km. <...
6
votes
1answer
410 views

Google Maps API latitude/longitude pair to Google Fusion Tables query

I'm trying to learn JavaScript, and as a practice tool I recently wrote a simple web app that uses the Google Maps API Geocoder to get the latitude and longitude of a location (user input), manipulate ...
5
votes
3answers
1k views

Converting KML/XML to Javascript

So, I have the boundaries of every states in the US, from the google map KML file. This KML file is actually a XML file. I'm converting this file to a JS file compatible with google map in order to ...
5
votes
1answer
419 views

Improving a triangulation test script

I am a relative beginner to Python and as such I've been working on little things here and there in the office that strike me as something interesting that might be fun to try and code a solution. ...
5
votes
1answer
233 views

Geocoding hook for a TYPO3 extension

I'm currently developing a TYPO3 Extension in PHP and developed a Hook. TYPO3 has the concept of Hooks where you can execute your own code as specific points. As defined in our definition of done, we ...
5
votes
1answer
592 views

Finding nearest city from a center place (latitude and longitude) with radius in miles

This is my code for finding the nearest city within a certain radius. I am not sure, is my code is OK or is it wrong? Please review and offer suggestions on my code. ...
5
votes
1answer
1k views

Using $q in Angular JS to pass navigator geo JSON from factory to controller

This code is used to get the users location and deliver it as a resource to the controller. The aim is to have this data shared across multiple controllers in the application. So far this does deliver ...
5
votes
0answers
85 views

Computing intersections of a Polyline and a line

I wrote a script to compute / interpolate the nodes of a Polyline at a given latitude, input_lat. It works for my purpose but I am wondering if there is a better, ...
4
votes
2answers
322 views

Calculating sun rise/set time at various places on Earth

This is the algorithm for calculating sun rise/set time at various places on Earth. I took it as an example of multiple functions inside of one top function. This is Ver 0.3: ...
4
votes
1answer
367 views

Latitude/longitude waypoint distance calculations, crosstrack, VMG, ETA, etc

I'm in the process of a complete re-write of a stagnant and ill-conceived project. I would like some feedback on the following Python 2.7-3.4 code, before I go any deeper into it. I would hope it is ...
4
votes
1answer
62 views

Downloading 2 tables from db, does calculation and uploads resulting table

I have written this script that downloads two tables from the db, preforms an intersection on them and adds 2 new columns to the resulting table, and uploads the resulting table to the db. It's a bit ...
4
votes
1answer
657 views

Converting latitude and longitude coordinates from CSV using web service

I am working on converting a mailing list that has longitude and latitude coordinates within the CSV file. This script I came up with does what I need, but this is my first real-world use of python. I ...
4
votes
0answers
1k views

Satellite orbit simulation in Matlab using Runge Kutta 4

I have a satellite orbit simulation in Matlab (Using Runge Kutta 4). It seems ugly and I don't know how to fix it. fx.m file: function v = fx(t,x,vx) v = vx; ...
3
votes
1answer
188 views

Clustering 16 million records in parallel

I have a dataset with 16 million rows and may increase upwards of 30 million. I am using the parLapply to run across three cores in R. But it's taking two days to ...
3
votes
1answer
82 views

Finding travel distance between airports

I have 2 nested for loops which i want to get rid of. Any thoughts? I am calculating distance between cities based on their longitude and latitude. There is a custom function ...
3
votes
2answers
98 views

Join JSON objects on common property

is there an easier/more efficient way to join two JSON objects on a common property than this? It's a GeoJSON file (basically an array of objects), and I want to pull in a property from another JSON ...
3
votes
1answer
934 views

JavaScript geocoder

I'm pretty excited to have coded my first JavaScript file which now works, and I've spent my evening trying to improve it. It takes a location in the #loc input ...
3
votes
1answer
66 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 ...
3
votes
1answer
260 views

PANDAS spatial clustering

I'am writing on a spatial clustering algorithm using pandas and scipy's kdtree. I profiled the code and the .loc part takes most time for bigger datasets. I wonder ...
3
votes
1answer
81 views

Updating geo coordinates

An error in a live environment was detected when trying to convert string geo coordinates into a double. The current culture (hu-HU) uses comma instead of point ...
3
votes
1answer
70 views

Geocoding library

I've written a Geocoding library that is hosted on Github. It has got 7.9 rating by the scrutinizer. I've checked and the only thing that I think I can improve is ...
3
votes
1answer
265 views

Entering address details into Google Maps geocoder

I have a Google Maps Geocoder and I am looking to refactor it. The user enters address details into a form where at the bottom there is the option to show on map. First the map is hidden The user ...
2
votes
1answer
218 views

DbGeography search query

I have a situation in which I need to get the closest road to a DbGeography point. This takes 5 - 8 seconds to run in some cases. I have a ...
2
votes
2answers
629 views

Haversine formula in SQL

This is an implementation of the Haversine formula in Microsoft Transact SQL. How can I simplify the function? ...
2
votes
2answers
107 views

Processing huge files of GPS data, extracting fields from five lines before and after each timestamp

I have written a shell script to process my huge data files (each one having around 7,000,000 lines ~ a weeks data in a single file). Here is a sample of my data file (i.e., input file) structure: <...
2
votes
1answer
52 views

Zip code reduce function

My task is to write a function that would take an array of zip codes and spit out only the zip codes that do not qualify. A non-qualifying zip code will not exist in the database and does NOT have ...
2
votes
2answers
202 views

Filling modal from JSON (dynamically)

My Java app converts its modal object to JSON (using the GSON Library). This is just fine, but I have to get it back into a modal in PHP. Now I've created a modal (in my case it's, for example, ...
2
votes
1answer
34 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, ...
2
votes
1answer
183 views

Core location background update and upload to server

I want to upload a user's location to a server to send them a location-sensitive alert, so the location needs to be fairly accurate: ...
2
votes
1answer
146 views

Parsing data from big json field and geocode services then store to PostgreSQL using psycopg2 instead django-orm

This code works, but my boss told me that it's very bad code, and don't want to deploy it. It is my first time working as a programmer and I have at least 3 months of experience. ...
2
votes
1answer
89 views

Parsing GPS data

Recently I sent this code snippet as CV attachment and I got simple answer - this code smells and we employ another developer. I'm new to RoR, so guys can you give me directions to refactor this code ...
2
votes
1answer
1k views

DbGeography calculation

Given the following piece of code, can it be done better: ...
2
votes
2answers
1k views

Address geocoder

If you notice, there are variables of street_address, route, intersection re-used in the ...
2
votes
1answer
375 views

Multithreaded GPS system

I am trying to reduce the total execution time of my code. I have a GPS system which calculates routes between two points, and returns all points in between them. I did a simple profile and the ...
2
votes
0answers
63 views

Identifying Polylines and operating on field values

I'm using Python 2.7.5 in a GIS environment (namely: QGIS 2.8.1, or PyQGIS). sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0) The aim is to identify spatially identical ...
2
votes
0answers
179 views

Smoothing matrix for visual representation

I recently started playing around with R and am currently trying to plot GPS data points onto a perspective plot. I have a script that works and I get my desired results out of it and it works ok for ...