Re: [gdal-dev] Real and "raster" coordinates

2010-03-24 Thread Chaitanya kumar CH
Alexander, You can use the GDALGetGeoTransform() or GDALDataset::GetGeoTransform() to get the affine transformation coefficients which can be used to calculate lat/long to col/row and vice versa. You can see the utility script gdal_merge.py for an example. On Wed, Mar 24, 2010 at 11:57 AM, Alexan

[gdal-dev] Re: how: dealing with osm data and creating custom shape files

2010-03-24 Thread Jukka Rahkonen
Christoph Dohmen gmx.de> writes: > Thanks to Ralf and Frederik! > > But now I want to group those data together. > Well, I want to create a shapefile containing all road-objects. > This is quite easy using ogr2ogr select everything with a value > for highway-attribute. Doing the same for rivers

[gdal-dev] unclear pixel resolution in a world file

2010-03-24 Thread Andreas Joisten
Hi all, the pixel resolution within a world file must be set up. The world file is defined below: Line 1: pixel resolution in the x-direction * cos (rotation) Line 2: - pixel resolution * sin (rotation) Line 3: - pixel resolution * sin (rotation) Line 4: - pixel resolution size in the y-direct

Re: [gdal-dev] Real and "raster" coordinates

2010-03-24 Thread Jose Gomez-Dans
Hi On 24 March 2010 06:27, Alexander Bruy wrote: > I have a georeferenced raster and coordinates of some point (lat, lon) > inside raster. Is it possible > to convert this lat/lon coordinates to raster coordinates (column and row)? > Use the geotransform (you may need to reproject your lat/lon

Re: [gdal-dev] Maintenance report for Feb 24, 2010 to Mar 23, 2010

2010-03-24 Thread Ivan Lucena
Hi Chaitanya. The link is broken: http://trac.osgeo.org/gdal/wiki/MaintenanceReportsByChaitany Regards, Ivan > ---Original Message--- > From: Chaitanya kumar CH > To: Frank Warmerdam , gdal dev > > Subject: [gdal-dev] Maintenance report for Feb 24, 2010 to Mar 23, 2010 > Sent:

Re: [gdal-dev] Maintenance report for Feb 24, 2010 to Mar 23, 2010

2010-03-24 Thread Chaitanya kumar CH
Oops! It's http://trac.osgeo.org/gdal/wiki/MaintenanceReportsByChaitanya Although, trac.osgeo.org seems to be down now. On Wed, Mar 24, 2010 at 6:50 PM, Ivan Lucena wrote: > Hi Chaitanya. > > The link is broken: > http://trac.osgeo.org/gdal/wiki/MaintenanceReportsByChaitany > > Regards, > > Iva

[gdal-dev] Question on OGRwkbGeometryType

2010-03-24 Thread Stefan Moebius
Hi, The documentation of OGRwkbGeometryType mentions the following: wkbPoint25D 2.5D extension as per 99-402 wkbLineString25D2.5D extension as per 99-402 wkbPolygon25D 2.5D extension as per 99-402 wkbMultiPoint25D2.5D extension as per 99-402 wkbMultiLineString25D 2

[gdal-dev] Re: GDAL with netCDF4 support

2010-03-24 Thread scizmeli
Parts of this message have been posted in DebianGIS today. Sorry for the cross-post. I would strongly encourage the inclusion of netcdf-4 inside GDAL. Not merely for HDF5, but also for OpenDAP. I just recently discovered that OpenDAP libraries are now being included built-in in the new netcdf4 :

Re: [gdal-dev] Question on OGRwkbGeometryType

2010-03-24 Thread Frank Warmerdam
Stefan Moebius wrote: Hi, The documentation of OGRwkbGeometryType mentions the following: wkbPoint25D 2.5D extension as per 99-402 wkbLineString25D 2.5D extension as per 99-402 wkbPolygon25D 2.5D extension as per 99-402 wkbMultiPoint25D 2.5D extension as per 99-402 wkbMulti

[gdal-dev] Re: How to divide a raster layer into a set of tiles

2010-03-24 Thread Eli Adam
No good reason. I'm more familiar with the other commands since I use them often is the main reason. A side benefit is that I can match existing tiles on other datasets and adopt existing tile names too. Now that I've read the utility pages for gdal_merge and gdal_retile I see that would be an ea

Re: [gdal-dev] Question on OGRwkbGeometryType

2010-03-24 Thread Stefan Moebius
Thanks a lot. Frank Warmerdam wrote: Stefan Moebius wrote: Hi, The documentation of OGRwkbGeometryType mentions the following: wkbPoint25D 2.5D extension as per 99-402 wkbLineString25D 2.5D extension as per 99-402 wkbPolygon25D 2.5D extension as per 99-402 wkbMultiPoint25D

[gdal-dev] field name in ESRI file

2010-03-24 Thread Oz Nahum
Hello GDAL Devs, I encoutered a small problem, where I don't understand why field names in ESRI Shape files created by gdal, are truncated. Here is a code snippet: field_LUC = ogr.FieldDefn() field_LUC.SetName('LAND USE CODE') field_LUC.SetType(ogr.OFTInteger) field_LUC.SetWidth(1

Re: [gdal-dev] field name in ESRI file

2010-03-24 Thread Peter J Halls
Oz, shapefiles use the dBase IV format .dbf file for attributes: this defines the maximum field name width to be 10 characters - 'LAND USE CODE' has 13. Also, space characters are not permitted - use underscore '_' instead. Whilst GDAL may create the field names as you have specified, othe

RE: [gdal-dev] field name in ESRI file

2010-03-24 Thread Jason Roberts
Oz, The specification that Peter refers to is http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf. Also, check out the OGR Shapefile driver's documentation http://www.gdal.org/ogr/drv_shapefile.html. It documents this issue, as well as others that might be of interest. Finally, if you a

Re: [gdal-dev] field name in ESRI file

2010-03-24 Thread Oz Nahum
Hi Guys, Thanks for everyone for the answers. I'm sorry about the haste in sending the email. I've should have read more carefully. This issue is even in WIKIPEDIA ... Oz. On Wed, Mar 24, 2010 at 4:47 PM, Jason Roberts wrote: > Oz, > > The specification that Peter refers to is > http://www.esri.

[gdal-dev] Adding multipolygons to an existing geometry collection

2010-03-24 Thread danotchki
Hello List, I hope you will be able to help me. I'm stuck on a problem. I'm trying to reconstruct within my Python script polygons from a shapefile that belong together. So I naturally perfomed: geom_tmp = ogr.CreateGeometryFromWkb(ftr.GetGeometryRef().ExportToWkb()) geom.AddGeometryDirectly(geo

Re: [gdal-dev] field name in ESRI file

2010-03-24 Thread Eric Wolf
ESRI Shapefiles use the ancient DBF format for attribute data. DBFs restricts the length of field names. When I have to work with Shapefiles, I try to stick to 8-character field names and avoid spaces and special characters. -Eric -=--=---===---=--=-=--=---==---=--=-=- Eric B. Wolf

[gdal-dev] Output MapInfo File with CoordSys Information

2010-03-24 Thread Reinaldo Escada Chohfi
Hello Frank and List, We waited for the release of GDAL 1.7.0 to see if we could output MapInfo Fiels (.tab or .mif/mid) with SRS information. We still can not output .tab or .mif/mid files with SRS information. Could you please check the test code below to see what's missing or wrong? Thanks i

[gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
Hey guys. I posted a few days ago about a problem with using ogrinfo to read ODBC from a MS SQL server. $ ogrinfo test.ovf ERROR 1: No column definitions found for table '�o��y.����y', layer not usable. (... and so on, more binary table names ...) I can connect to the ODBC/MSSQL

Re: [gdal-dev] Re: GDAL with netCDF4 support

2010-03-24 Thread Chris Barker
scizmeli wrote: I would strongly encourage the inclusion of netcdf-4 inside GDAL. Not merely for HDF5, but also for OpenDAP. +1 I just recently discovered that OpenDAP libraries are now being included built-in in the new netcdf4 : http://www.unidata.ucar.edu/software/netcdf/. yes, but it's

[gdal-dev] Re: Gdal / Python / Win7 crash with ReadAsArray()

2010-03-24 Thread NopMap
Tamas Szekeres wrote: > > If you could do a test with the binaries provided at > http://vbkto.dyndns.org/sdk/ that would be helpful. It seems the python > auto-tests are working well with these packages on a Win2003 Server x64 > platform. > I have downloaded a release from there. It looks a b

Re: [gdal-dev] Re: Bug in coordinate system library? unknown elliptical parameter for BNG coordinate system

2010-03-24 Thread Jean-Claude REPETTO
Alex Hagen-Zanker a écrit : Just to remind you: I reported a similar problem when 1.7 just came out. Maybe it helps in identifying the problem. http://www.mail-archive.com/gdal-dev@lists.osgeo.org/msg05605.html Hi Alex, There is probably something wrong in your installation. Check the paths

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Frank Warmerdam
Gregor at HostGIS wrote: Hey guys. I posted a few days ago about a problem with using ogrinfo to read ODBC from a MS SQL server. $ ogrinfo test.ovf ERROR 1: No column definitions found for table '�o��y.����y', layer not usable. (... and so on, more binary table names ...) I can

[gdal-dev] Re: Output MapInfo File with CoordSys Information

2010-03-24 Thread Frank Warmerdam
Reinaldo Escada Chohfi wrote: Hello Frank and List, We waited for the release of GDAL 1.7.0 to see if we could output MapInfo Fiels (.tab or .mif/mid) with SRS information. We still can not output .tab or .mif/mid files with SRS information. Could you please check the test code below to see wh

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
Frank Warmerdam wrote: > Debuging MS SQL related bugs isn't really all that convenient for me Ha ha! I myself rank any dealing with MS SQL on par with cleaning the Augean Stables. I understand. :) You could add some debug statements in the gdal/port/cpl_odbc.cpp code in an attempt to determi

Re: [gdal-dev] Adding multipolygons to an existing geometry collection

2010-03-24 Thread Frank Warmerdam
danotchki wrote: Hello List, I hope you will be able to help me. I'm stuck on a problem. I'm trying to reconstruct within my Python script polygons from a shapefile that belong together. So I naturally perfomed: geom_tmp = ogr.CreateGeometryFromWkb(ftr.GetGeometryRef().ExportToWkb()) geom.Ad

[gdal-dev] Re: Output MapInfo File with CoordSys Information

2010-03-24 Thread Reinaldo Escada Chohfi
Frank, It worked now. Thanks a lot. Regards, Reinaldo > Reinaldo Escada Chohfi wrote: >> Hello Frank and List, >> >> We waited for the release of GDAL 1.7.0 to see if we could output >> MapInfo >> Fiels (.tab or .mif/mid) with SRS information. >> >> We still can not output .tab or .mif/mid fil

Re: [gdal-dev] Re: GDAL with netCDF4 support

2010-03-24 Thread Michael Sumner
Chris wrote: >> By the way, >>GDAL/netcdf-4 seems to be my only was of being able to access OpenDAP data >>from inside R. >Which is why you should use Python (and Rpy) ;-) I didn't know Python was widely used for OpenDAP - is that via GDAL or native? Can you point to examples of its use and se

RE: [gdal-dev] Real and "raster" coordinates

2010-03-24 Thread Pinner, Luke
The following module might help, use the mapToPixel() function. #---Imports try: from osgeo import gdal except ImportError: import gdal def mapToPixel(mx,my,gt): ''' Convert map to pixel coordinates @param mxInput map x coordinate (double) @param myInput map

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
Hey, this is so excellent. I took Frank's advice about just trying to hack the C++ code... and discovered as a side effect that FreeTDS has a new release. This new release fixed the issue. Ha! I do have one outstanding issue, though: it is very, very, very, very slow because it scans every tab

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Frank Warmerdam
Gregor at HostGIS wrote: Hey, this is so excellent. I took Frank's advice about just trying to hack the C++ code... and discovered as a side effect that FreeTDS has a new release. This new release fixed the issue. Ha! I do have one outstanding issue, though: it is very, very, very, very slow

Re: [gdal-dev] Issue with ogrinfo: unixODBC and MS SQL

2010-03-24 Thread Gregor at HostGIS
From the docs: Hey, how'd you know about that fix I found? Oh right, you invented it. :) Thanks a million, Frank -- you're worth twice your weight in gold. Even just telling me to go hack it myself, actually got the job done, and I learned a bit about the internals of OGR+ODBC. -- HostGIS,

Re: [gdal-dev] Real and "raster" coordinates

2010-03-24 Thread Alexander Bruy
Thanks! That what I need 2010/3/25 Pinner, Luke : > The following module might help, use the mapToPixel() function. > > #---Imports > try: >    from osgeo import gdal > except ImportError: >    import gdal > > def mapToPixel(mx,my,gt): >    ''' Convert map to pixel coordinates >       �...@param