gis

WKB string to WKT, GeoJSON in Python

WKB string to WKT, GeoJSON in Python Question: I have a number of WKB strings, couple of examples given below: s1 = "0103000020E6100000010000000F000000BE63303EF1D551C078E289F14742454073F7B8FAD3D551C04B98F57E0F424540FC0EA22ED4D551C04ADE36890F424540ECEB53ACD5D551C07FE2CBCA0F424540D168512BD7D551C07F2DF9F80F42454043DB28ABD8D551C0A108AD13104245406D5A632BDAD551C01D42E31A104245408D378FABDBD551C0D9AB970E10424540AD23382BDDD551C008C1CFEE0F424540C61DEBA9DED551C077EC92BB0F4245403BD33327E0D551C02043F2740F424540E58DA0A2E1D551C0A4CA001B0F4245406245BE1BE3D551C09921DDAD0E424540C8E232ADF7D551C01C11F7CA4A424540BE63303EF1D551C078E289F147424540" s2 = "0103000020E610000001000000060000009F64481FFD3A57C0E3AFF8C1EF7546407CEFEB30FD3A57C00AF4140AE375464018F55F07013B57C06018D414E37546407903F73F023B57C0BDF93E18E37546405F31E72D023B57C08D827D20F07546409F64481FFD3A57C0E3AFF8C1EF754640" I want to convert them to WKT or GeoJSON type as I am able to do using the following online tool: https://rodic.fr/blog/online-conversion-between-geometric-formats/ Is there a way for me to …

Total answers: 1

How to deal with GeoDataFrame object having no attribute explore?

How to deal with GeoDataFrame object having no attribute explore? Question: I have already reinstalled geopandas, but I still get error: ————————————————————————— AttributeError Traceback (most recent call last) Input In [35], in <cell line: 1>() —-> 1 df.explore("pop_est", cmap="Blues") File ~Anaconda3envsGPDlibsite-packagespandascoregeneric.py:5575, in NDFrame.__getattr__(self, name) 5568 if ( 5569 name not in self._internal_names_set 5570 and name …

Total answers: 2

Syntax for creating a new, empty GeoDataFrame

Syntax for creating a new, empty GeoDataFrame Question: I have a GeoDataFrame (let’s call it Destinations) that was made from a point shapefile using GeoPandas. For every feature (correct me if the terminology is wrong) in Destinations, I need to find the nearest node on a graph and save that node to another GeoDataFrame (let’s …

Total answers: 2

how to install djangorestframework-gis-distance

How to install djangorestframework-gis-distance Question: I am on Ubuntu and I tried to install djangorestframework-gis-distance I followed the instructions and installed the dependencies which installed fine. But when I install djangorestframework-gis-distance it gives an error of ERROR: Command errored out with exit status 1: command: /home/aarush/git_fudo/food1_back/food1_back/env/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-ntgn7sle/djangorestframework-gis-distance/setup.py’"’"’; __file__=’"’"’/tmp/pip-install-ntgn7sle/djangorestframework-gis-distance/setup.py’"’"’;f=getattr(tokenize, …

Total answers: 1

How to speed up extracting data from raster file for points using GDAL python

How to speed up extracting data from raster file for points using GDAL python Question: I have 366 raster image files (MODIS satellite daily data) in tif format containing snow data and another csv file containing 19,000 locations (latitude and longitudes). I need to collect the snow data from raster files. I have tried collecting …

Total answers: 2

How to use geopanda or shapely to find nearest point in same geodataframe

How to use geopanda or shapely to find nearest point in same geodataframe Question: I have a geodataframe showing ~25 locations represented as point geometry. I am trying to come up with a script that goes through each point, identifies the nearest location and returns the name of the nearest location and the distance. I …

Total answers: 2

Elevation (XYZ) data to slope/gradient map using python

Elevation (XYZ) data to slope/gradient map using python Question: I have a text file with Easting (x), Northing (y), and Elevation data (z) as shown below: x y z 241736.69 3841916.11 132.05 241736.69 3841877.89 138.76 241736.69 3841839.67 142.89 241736.69 3841801.45 148.24 241736.69 3841763.23 157.92 241736.69 3841725.02 165.01 241736.69 3841686.80 171.86 241736.69 3841648.58 178.80 241736.69 3841610.36 …

Total answers: 2

Python script to run FME workbench

Python script to run FME workbench Question: I have more than 500 xml files and each xml file should processed on FME workbench individually (iteration of FME workbench for each xml file). For such a propose i have to run a python file (loop.py) to iterate FME workbench for each xml file. The whole process …

Total answers: 4

Fastest way to get all the points between two (X,Y) coordinates in python

Fastest way to get all the points between two (X,Y) coordinates in python Question: So I have a shapely LineString: print np.round(shapely_intersecting_lines.coords).astype(np.int) >>> array([[ 1520, -1140], [ 1412, -973]]) This can be interpreted as a numpy array as well as seen above. I want to get all the points in between, that is I want …

Total answers: 5