Skip to content

Tag: gis

WKB string to WKT, GeoJSON in Python

I have a number of WKB strings, couple of examples given below: 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 do the same on Python? Answer You can use shapely for th…

pyproj conversion UTM to lat/long out by 3 deg

I am reading UTM point data from a shape file. The geopandas CRS string associated with the shape file is: I convert the point data to lat/long using pyproj: This gives me the correct latitude but the longitude is exactly 3 degrees out. I changed the UTM zone to utm=+20 but now am 3 degress out in the other d…

degree decimal to utm conversion, python

I got surprised when I tried to convert degree decimal coordinates into utm by using available library in anacondautm. my coordinates looks like: and lat values are: when I made scatter plot it looks like normal: After converting coordinates in to utm distribution of the points change completely and looks str…

Plotting Distributions(Histogram) on map

I have data in the format (latitude, longitude, value). I want to plot (lat, long) -> value on a map of the city. Something like the following images: I’ve already tried the following: Python’s Matplotlib: Unable to find required functions Plotly r-barplots on map, RG-histogram-bar-chart-over-m…

How do I change a raster’s geotransform with GDAL?

I’m trying to use GDAL to set the geotransform of a new raster that I’ve created by following the steps outlined in the GDAL API Tutorial. The dataset.SetGeoTransform() documentation says that this should set the affine transformation coefficients (which, according to the dataset.GetGeoTransform()…