New answers tagged

0

I noticed that you are not writing out the transform. I think that is the main problem. Here is how you can retrieve and write the information: with rasterio.open(filename) as src: dst_transform = src.transform dst_crs = src.crs ## saving bands individualy new_dataset = rasterio.open( 'ReflectanceB1.tif', 'w', driver='GTiff'...


0

As it was said in comments, you can find the answer in gdallocationinfo sources. It does the following thing: In [37]: band = ds.GetRasterBand(i) In [38]: band.GetMetadataItem('Pixel_1000_1000', 'LocationInfo') Out[...


1

use proj4 string of EPSG:4326 in geotifcp +proj=longlat +datum=WGS84 +no_defs Also I suggest to use GDAL_TRANSLATE to create GeoTIFF which can be used directly in Geoserver.


-1

Maybe you are trying to process raster with bit-depth = 8bits. Simply, add filetype: -ot Float32 for example, and won't clamp.


2

There are a number of ways you can add your raster to GeoServer, all of these require you to know what the projection of your data is (probably EPSG:4326 or WGS84 lat/lon). Possibly the simplest, just tell GeoServer what the projection is after adding the data to the store. When you publish the layer simply fill in the declared SRS as EPSG:4326 and select ...


0

As far as I know, PostGIS stores raster in bigger objects, not tile-wise. So your one line contains multiple raster cells, which you can see in any GIS program. Have you tried to use -t <a>x<b>, where a and b are the size of your raster cells? At least I've done that once and the corresponding value should be accessible with ST_Value. Check out ...


1

This is the projection you are looking for https://spatialreference.org/ref/epsg/4326/ which has the following proj4 string +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs


0

So, I decided to forgo the use of raster2pgsql and trying to "fix" the datatable for my purposes. I instead wrote a python script to read a tif file and upload its information to PostGIS, using rasterio and psycopg2. If anyone has a comment as to why this isn't a default behavior obtainable with raster2pgsql, I'm still curious. GeoTIFF, from my ...


1

To compare the overlap between two images find the extent of each image in the same coordinate system and then compare the coordinates. This question has some examples of how to get the extent using python.


2

I downloaded a zipfile and checked one of the rasters with gdalinfo: micha@RMS RGI60-18 $ gdalinfo RGI60-18.00001_thickness.tif Driver: GTiff/GeoTIFF Files: RGI60-18.00001_thickness.tif Size is 13, 13 Coordinate System is: PROJCS["WGS 84 / UTM zone 60S", The raster size is reported as 13x13 and the coordinate system is UTM60S, So I created a new GRASS ...


0

Since QGIS 2.16, just export from the print composer. By default, it will be a GeoPDF. https://qgis.org/en/site/forusers/visualchangelog216/index.html#feature-georeference-outputs-eg-pdf-from-composer


1

Pulling an uncompressed and untiled geotiff (even a small one like 128Mb) is going to be slow. You should process the GeoTiff using the advice in GeoServer on Steroids (video) or Paul Ramsey's GeoTiff Compression for Dummies. This will probably make your tiff small enough that the network transport cost doesn't overwhelm your reading time.


1

If you are using the internal GeoWebcache then you simply need the WMTS capabilities document which is linked from the front page of GeoServer. Inside that document you will find the templates you need as ResourceURLs: <ResourceURL format="image/png" resourceType="tile" template="http://localhost:8080/geoserver/gwc/service/wmts/rest/nurc:Pk50095/{style}...


0

When you use the -a_srs flag you are telling GDAL that you know that the projection of the raster is the following epsg code (in your case EPSG:4326) but that is not the projection of your raster (grid_mapping=Lambert_Conformal). There isn't enough information encoded in the raster to tell us what the actual projection is but you should be able to find it ...


3

The WriteArray() method has two useful optional arguments to accomplish this: xoff: specifies the offset on the x axis. yoff: specifies the offset on the y axis. This means that it will write a 2D array (this is very important) to the band, starting from the specified offsets (which are 0 by default). This is very useful because you don't have to read the ...


1

The blocky noise around the borders looks like the image was compressed with a lossy method. The lossy compression is especially hard on sharp boundaries and white spaces, introducing slight color variations that ArcGIS isn't seeing as white when you tell it to remove the white background. Ensure that both your TIFF and the pyramids are compressed with a ...


0

The default workspace in geoserver was changed so it didnot work. Setting geonode as default workspace solved the issue.


2

Figured it out by further configuring the REST interface. Create the coverage store from the server-resident file (which automatically creates a coverage as well). system(paste('curl -f -k -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "/usr/share/geoserver/data/data/myworkspace/myraster.tif" "http:// my_mv_ip/geoserver/rest/workspaces/...


0

You probably need to set the projection (that's what the error message is saying). Try creating a .prj file to go with the .tif and .tfw files if you already know the projection. http://epsg.io will be able to show you what goes in it. Alternatively, when saving out of QGis be sure to make sure that there is a CRS set for your layer.


Top 50 recent answers are included