Thank you so much! I was looking to convert CSV to Tiff and none of other posts on internet seemed to work. Your tutorial was perfect solution to my use case. Thanks again!
@antonstsezhkin6578 Жыл бұрын
Bless you for covering different use cases! And thanks than mine is included.
@seyedpeyman609210 ай бұрын
Useful and Clear ! Thank You for this Great Tutorial
@gunnarorsteinsson11703 жыл бұрын
Omg it worked, thank you! I'd been struggling with solving this particular problem for hours.
@johnegyir9704 Жыл бұрын
Clearly explained! Thank you very much. This is really helpful.
@mountainmanpedro2 жыл бұрын
This is such a clear and useful tutorial--thank you for this--extremely helpful.
@alejandrocalderon74522 жыл бұрын
You are amazing! Everything was so clear. Thank you very much!
@johnowusukonduah23052 жыл бұрын
Great video. This was what I've been looking for all this while. Thank you Madam.
@adeniranibrahim60712 жыл бұрын
Nice video. Detailed and explanatory
@gulnihalkurt17612 жыл бұрын
amazing tutorials
@oceancolor10692 жыл бұрын
hot damn ... thank you so much!
@rodrigo.cedeno3 жыл бұрын
Great tutorial! It really helped me a lot! Thank you!
@lluisarruevicedo9333 жыл бұрын
where are you from? I need to find you to thank you taht you just saved my day! Pd. Don't tell my boss you told me how to do my work hahahahah
@elnuisance3 жыл бұрын
I only have a csv file with x, y, z(value) data. I am trying to interpolate them by rasterizing using your method. But I am stuck at xRes, yRes
@brianlee52873 жыл бұрын
Very great tutorial! Do you have any advice on converting from xy to lat long?
@makingsenseremotely62073 жыл бұрын
I use geopandas. Here is an example that I have for converting lat/lon into UTM coordinates. You would just have to switch the EPSG codes. gdf = df.set_geometry(gpd.points_from_xy(df.longitude, df.latitude), crs="EPSG:4326") proj_df = gdf.to_crs("EPSG:32719") df["x"] = proj_df.geometry.x df["y"] = proj_df.geometry.y
@brianlee52873 жыл бұрын
@@makingsenseremotely6207 Very useful! I ended up using osr/ogr to transform the spatial reference, but geopandas is much more elegant. Thanks for the channel!
@stozi923 ай бұрын
Thanks for the video. How can I convert X and Y to Lat and Lon in a csv file?
@liminzhang55162 жыл бұрын
Thank you for your great info. after I run this line code dfn = pd.DataFrame({"x":x, "y":y, "value":flat}) raise ValueError("arrays must all be same length") ValueError: arrays must all be same length is my DEM.TIF file not right? can you post your DEM.TIF file download link?
@mahsabozorgi Жыл бұрын
Thank you for the video, How can I conver GeoTIFF to Binary?
@asmitasubedi82153 жыл бұрын
Thank you for the video! How can I convert a number of .hdf files to csv? Any help would be appreciated.
@saisskumar15023 жыл бұрын
Hi. I am getting the "Null pointer received" error.. what is the fix? I followed the steps as it is.
@anusrutimitra11153 жыл бұрын
is it possible to make landsat 8 geotiff to csv?
@theproudsanatanikafir66563 жыл бұрын
heyyyy! it is python so you can do any thing
@pratikbhattacharjee20252 жыл бұрын
I have successfully converted the xyz file to a GeoTif format with no error message. But the output GeoTif file is not there in my directory and the variable is empty too.
@Theworldfrommyeye.x3 жыл бұрын
Please make some videos on conversion of .grd file to CSV. It would be great if you can guide me to do so. I am thinking of using python mrgs and gdal public libraries.
@heetjoshi19103 жыл бұрын
I have tried your way to make Geotiff from CSV but the problem is whatever input Lat-Long I have given, when I'm checking my output geotiff's Lat-Long, They both are not same. How is it possible?? Thank you very much for your tutorial.
@johnowusukonduah23052 жыл бұрын
How can we do similar for multiband raster?
@MuradEllafi3 жыл бұрын
I got this error : ModuleNotFoundError: No module named 'sogeo' can you help me please?
@mariafernandamoralesoreamu60194 жыл бұрын
Hi! If i want to interpolate to a new cell resolution (size) in the output raster, what do I have to add to the gdal.grid code? For example, I had a 1000x1000 cell resolution, which gave me the xyz coordinate points, and I want the interpolated raster with a new cell resolution of 10x10 m. Thanks!
@makingsenseremotely62074 жыл бұрын
Hi. For some reason, there is no gdal.Grid() option to set the x+y resolution of the output raster, only height+width in pixels. The command-line version of that program, however, allows you to specify a target resolution. So you have two options: 1) run gdal_grid as a subprocess and specify the output file resolution with -tr 10 10 2) resample the interpolated raster to the desired resolution with gdal.Translate() or gdal.Warp()
@mariafernandamoralesoreamu60194 жыл бұрын
@@makingsenseremotely6207 Thanks! It works with using gdal_grid as a subprocess. But now I get the error "Failed to find field 'z' on layer file, skipping", so it returns an empty raster. Do you know why this could be? I checked with ogrinfo and the points appear to have a Z value.
@makingsenseremotely62074 жыл бұрын
What format does your input data have? If you are using csv + vrt, then make sure that in the vrt file, the value for z under Geometry Field corresponds to the z column name in your csv file. If you are directly using e.g. a shapefile as input, try explicitly setting the z value with the option -zfield "whateveryourfieldnameis"
@stergiod59954 жыл бұрын
hey, first of all thank you for your videos!! I have a question, what about change jp2 raster (like Sentrinel) to tiff? I am trying to translate all the bands as tiff in a new folder. Thanks anyway.
@makingsenseremotely62074 жыл бұрын
Hey, if you want to convert each band to a separate new tiff, gdal.Translate("output.tif", "input.jp2") should work. If you want to merge all jp2 files into one multiband tiff raster, build a virtual raster with gdal.BuildVRT() first. Be sure to set separate = True, so each input file will be placed in a separate band. Then you can translate the vrt file to tiff with gdal.Translate().
@stergiod59954 жыл бұрын
@@makingsenseremotely6207 Yeap i found it! Thanks anyway I did it like this, i needed the bands seperated. for image in rawSat_folder: raw = gdal.Open(f'{RawSat_folder}/{image}') trans = gdal.Translate(f'{satImage_folder}/{image}.tiff', raw) trans = None
@yuhuibao17283 жыл бұрын
Very impressive, hope one day i could write code without looking turorial everywhere.
@mohammadferdosian61734 жыл бұрын
Hi, do you have any ENVI tutorial ?
@techstarplus3 жыл бұрын
kzbin.info/www/bejne/qZqzXoKcg7ughdk
@antonstsezhkin6578 Жыл бұрын
Oh! one more thing: you operate with x and y - which one should be latitude and which one the longitude?
@ecoro_10 ай бұрын
x is lon and y is lat, like in a map ... right?
@antonstsezhkin657810 ай бұрын
@@ecoro_ thanks!
@repsolrider68773 жыл бұрын
i have a 2.5Gb GeoTiff image and i used your code to extract pixel and its values but, the xyz file size is going on increasing it got upto almost 21gb and my anaconda environment got crashed, it happens everytime i run the code, can you help me where i was doing wrong?
@makingsenseremotely62073 жыл бұрын
As I mentioned in this video, it is not a good idea to do this for very large data sets, because the xyz files will get huge. Try to subset your data or just work with it in geotiff format. If you just want to extract pixel values at certain locations, there are better ways to do this than just turning the entire raster into xyz. Here is an example: gis.stackexchange.com/questions/317391/python-extract-raster-values-at-point-locations
@repsolrider68773 жыл бұрын
By increasing the paging file size to 100Gb did the trick, i got output csv file of 12gb, btw this GeoTiff image is our whole state so i need each and every pixel data and their coordinates to store it in db for future usage, and thank you so much your code helped me a lot, before py i used rasterToPoints() function in R to get coordinates and values of every pixel, but it got crashed every time, so i switched to py spyder and increased paging file size, i got output in 10min. About the link you gave me i have doubt, i have single GeoTiff file and i want to clip this GeoTiff file using coordinates only, not by shape file, csv file or extents how can we do that, that links suggests using shape file, thanks in advance
@makingsenseremotely62073 жыл бұрын
Glad to hear you found a way to make it work for you. The link I sent you is not about clipping a raster, but about extracting raster values at specific point locations. For clipping a geotiff file with coordinates I use gdal.Warp("dem_clipped.tif", dem, outputBounds = (xmin, ymin, xmax, ymax), dstNodata = -9999)
@repsolrider68773 жыл бұрын
I'm assuming the "dem" in the gdal.Warp() function is a dataframe which consists coordinates of a polygon right? If yes, can you show me few rows(3 should be enough) of that dataframe.
@makingsenseremotely62073 жыл бұрын
No. The dem is the dataset/geotiff that you want to clip (opened as gdal.Dataset). You could also just provide the filename, e.g. "dem.tif". It's further explained in my "Splitting raster data" video.