geo

Converting contours in an image to lines in shapefile using python

Converting contours in an image to lines in shapefile using python Question: I have processed a screenshot from google maps using OpenCV and identified some contours for the red road sections, and I want to project these contours to a shapefile. I have searched but couldn’t find an answer that followed the same purpose. Here …

Total answers: 1

Check if geographical polygon is valid

Check if geographical polygon is valid Question: I have a df that look like this coordinates={"type":"zone","bound":"POLYGON ((11.31767 43.32289, 11.32205 43.32467, 11.3235 43.32458, 11.32395 43.32474, 11.32411 43.32522, 11.32623 43.32516, 11.32647 43.32459, 11.32576 43.32435, 11.32581 43.32384, 11.32438 43.32332, 11.32803 43.32171, 11.32573 43.32016, 11.32571 43.31896, 11.32588 43.31844, 11.32319 43.31699, 11.32058 43.31589, 11.31782 43.31419, 11.3171 43.31093, 11.3166 43.31046, 11.31569 …

Total answers: 1

Draw a map of a specific country with cartopy?

Draw a map of a specific country with cartopy? Question: I have tried this example from the Cartopy gallery, which works fine. But how do I focus on another country, i.e. show only Germany? I’ve tried some coordinates on the extend() method, but I didn’t manage to get to look it like the US map. …

Total answers: 2

Getting distance between two points based on latitude/longitude

Getting distance between two points based on latitude/longitude Question: I tried implementing the formula in Finding distances based on Latitude and Longitude. The applet does good for the two points I am testing: Yet my code is not working. from math import sin, cos, sqrt, atan2 R = 6373.0 lat1 = 52.2296756 lon1 = 21.0122287 …

Total answers: 12

How to perform bilinear interpolation in Python

How to perform bilinear interpolation in Python Question: I would like to perform blinear interpolation using python. Example gps point for which I want to interpolate height is: B = 54.4786674627 L = 17.0470721369 using four adjacent points with known coordinates and height values: n = [(54.5, 17.041667, 31.993), (54.5, 17.083333, 31.911), (54.458333, 17.041667, 31.945), …

Total answers: 8