Tag Info

New answers tagged

1

Gdal PYthon binding works with conjuration with gdal. You need to have installed GDAL along with the binding to work. A quick skim over the errors you provided they suggest that while you installed gdal-python you haven't install the gdal by itself: A possible solution chain is: Install GDAL (http://www.gisinternals.com/sdk/) Append the installation ...


2

I suspect the issue is the GDAL 1.11 bindings you're fetching from gohlke do not match the internal GDAL inside of Arc*. Your bindings need to be compiled against ESRI's GDAL to work reliably. It's possible they can be made to work, but it is going to be a lot of headache. In short, ESRI needs to provide the gdal_i.lib stub file that GDAL generates as part ...


0

Creating a mosaic from your source images takes only a few seconds if you use GDAL virtual raster as output. Read http://www.gdal.org/gdal_vrttut.html and http://www.gdal.org/gdalbuildvrt.html Often the artifacts like you have can also be avoided by taking care that the individually warped images are aligned to use a common canvas. This can be achieved by ...


0

I am using package gdalUtils which uses gdal binary (for example osgeo4w). This combination works with most of GIS formats.


1

I believe what you are experiencing is more or less a copy of this question. The coordinates in the rainfall data are in longitude/latitude, but with values ranging from 0 to 360, instead of -180 to 180 (as your political boundaries are). See the GPCC spatial note here (emphasis mine): Spatial Coverage: 0.5 degree latitude x 0.5 degree ...


1

After all I found solution, but not sure if that is right and elegant. I used proj4 string that SeaWifs level 3 have: s_srs="+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" and overwrite georeferenced bounds by the values from SeaWifs hdf file a_ullr =c(-20037508.343,10018754.171,20037508.343,-10018754.171) after ...


0

Couchbase is not Apache CouchDB compatible, hence the OGR driver doesn't work. AFAIK there's currently no OGR driver for Couchbase.


0

use the dir() function dir(intersection) ['AddGeometry', 'AddGeometryDirectly', 'AddPoint', 'AddPoint_2D', 'Area', 'AssignSpatialReference', 'Boundary', 'Buffer', 'Centroid', 'Clone', 'CloseRings', 'Contains', 'ConvexHull', 'Crosses', 'Destroy', 'Difference', 'Disjoint', 'Distance', 'Empty', 'Equal', 'Equals', 'ExportToGML', 'ExportToJson', 'ExportToKML', ...


0

As the question allows for other packages I'd like to propose a solution using RIOS (https://bitbucket.org/chchrsc/rios/). It is build on top of the GDAL Python bindings but provides a simpler interface, taking care of the actual raster I/O. RIOS will provide the pixel values as a NumPy array, so you could use any of the inbuit stats functions or utilise ...


0

Have a look at this thread. If you have access to ArcMap you could you the SetNull tool in Spatial Analyst as discussed here.


0

Try using byte data instead of uint16. gdal_translate -ot byte -of vrt filename.img filename.vrt Then run gdal2tiles.py on the vrt instead of the img.


0

with gdal, you can color an image based on gdal_dem (color_relief) the syntax of the color configuration file is derived from the one supported by GRASS r.colors utility. ESRI HDR color table files (.clr) also match that syntax. The alpha component and the support of tab and comma as separators are GDAL specific extensions aspect: aspect oriented ...


1

you can loop on your files and append them to your list command = [sys.executable,gmerge,'-o','C:\\r.tif','-of','GTiff'] images = glob.glob("D:\\*.tif") for image in images: command.append(image) subprocess.call(command)


0

Gdal_rasterize uses the center of the pixel. As a workaround I would either rasterize a buffer around your input polygon (with half pixel size) or apply mathematical morphology on the result (aka erosion of one pixel)


0

Solution that works for me best involves picking subset of GPS tracks to construct an outline. For that I've wrote an algorithm that takes dissolved (split at intersection points) tracks set. The algorithm is very simple. It is based on searching for the neighboring track with the smallest angle between intermediate path end vector and candidate curve. This ...


1

Your output image will have more pixels than the sum of your input images, but this does not explain the large difference. I suggest that you look at the characteristics of your images based on gdalinfo in order to see what compression is used and check that the extents are correct. (assuming your input images have the same size, it makes 20000 * 12000 ...


0

I had the same problem today. Using the built-in Layer to KML tool and XTools didn't produce a nice image. But i brought in my georeferenced image into Global Mapper and it worked much better without any blurriness. Edit: I created the KML/KMZ in Global Mapper. I loaded the JPG, then used File, Export, Export Web Format. I checked on the Super Overlay Setup ...


1

No, as JPG does not support the GDAL create option but only GDAL create copy: you can check it using this code: from osgeo import gdal format = "Jpeg" driver = gdal.GetDriverByName( format ) metadata = driver.GetMetadata() if metadata.has_key(gdal.DCAP_CREATE) and metadata[gdal.DCAP_CREATE] == 'YES': print 'Driver %s supports Create() method.' % format ...


1

From the CSV driver documentation: Starting with GDAL 1.8.0, for files structured as CSV, but not ending with .CSV extension, the 'CSV:' prefix can be added before the filename to force loading by the CSV driver. Either rename DGM5_BE.txt to DGM5_BE.csv or change the <SrcDataSource> element to: ...


1

Manage to solve my problem. THis can be done by instantiating OGR and openup a shapefile database, layers etc Afterwhich, create a OGRPoint object with the neccessary lat lon input OGRPoint* pt = new OGRPoint(lat, lon); set a spatial filter based on this point object on the layer next extract the feature based on the filter resu;lt Finally extract the ...


3

Use the gdalwarp utility. gdalwarp -s_srs epsg:4326 -t_srs epsg:3857 input.tif output.tif


1

Use EPSG:3857. That is the official EPSG code number for Google mercator projection. 900913 was incorproated in GDAL some toime ago, but is now dropped in favour of 3857.


0

You can simply reproject your shapefile to a projection that has meters as units, like the UTM zone of your part of the world. Don't use Google/Pseudo/World mercator projection, its units coincide with real meters only at the aequator.


2

I would suggest you to use this alternative way to do the same: To export raster as TIFF, find the oid of the raters’ lob(large object) using the query: SELECT oid, lowrite(lo_open(oid, 131072), png) As num_bytes FROM ( VALUES (lo_create(0), ST_Astiff( (SELECT rast FROM raster_table WHERE rid = 1) ) ) ) As v(oid,png); Use the PostgreSQL \lo_export command ...


1

If you're scared or unsure about using command line tools like GDAL_Translate then there are other ways to do this. If you have Esri products then you can use Raster to Other Format or Copy Raster, you can even export the image from ArcMap just by right clicking on the layer and select export then fill in the blanks and select GeoTiff. If you want to use ...


1

You already have the vrt file. Install Mapserver/gdal. Create a map file that references the vrt file. Get wms working. Install mapproxy. setup mapproxy to act as a client to Mapserver wms Query mapproxy for your tiles. if you want to pre-generate all the tiles you will need the code to query mapproxy for them. The problem with the above is that as you go ...


1

The comments above lead me towards an answer (but if there are other possibilities, please let me know): gdal can utilise bands containing longitude and latitude values, which is called there geolocation arrays. The answer below may not be thorough and I myself don't understand all the details: The original image is a orbital swath in a raster (AMSR2 data) ...



Top 50 recent answers are included