[gdal-dev] Reading image byte data into a dataset in C#

2012-05-31 Thread avtoader
How does an individual with TIFF data (byte array) load it into a GDAL
dataset?  I'm trying to eliminate writes to disk to save on time so assuming
memory is not an issue, how do I accomplish this?
Thanks in advance!
-Alex

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Reading-image-byte-data-into-a-dataset-in-C-tp4978429.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Adding an alpha channel to a Virtual Dataset then Writing it out to a TIFF in C#

2012-05-31 Thread avtoader
I fixed the issue by using the "MEM" driver instead of the "VRT".  It was
really helpful and sped up my image output by a lot!

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/gdal-dev-Adding-an-alpha-channel-to-a-Virtual-Dataset-then-Writing-it-out-to-a-TIFF-in-C-tp4977895p4978428.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] multiple bands in gdal2xyz.py should be comma separated

2012-05-31 Thread Even Rouault
Le jeudi 31 mai 2012 12:55:21, Tom van Tilburg a écrit :
> Hi,
> 
> It seems that gdal2xyz.py currently supports the output of multiple
> raster bands using:
>  gdal2xyz.py -band 1 -band 2 etc
> 
> However, when I use this in combination with the parameter -csv I do not
> get the extected comma in between the values of my bands.
> Extected:   5.604, 50.765, 3, 2
> Received: 5.604, 50.765, 3  2 <== "notice the missing komma"
> 
> I briefly checked the python code and it seems to be an addition to
> 'band_format' is needed.
> 
> band_format = ("%g " * len(bands)).rstrip() + '\n'
> 
> should become something like
> 
> band_format = (("%g " + delim) * len(bands)).rstrip(",") + '\n'

I've committed just a slightly different version in r24523 :

band_format = (("%g" + delim) * len(bands)).rstrip(delim) + '\n'

Thanks

> 
> 
> Cheers,
>  Tom
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] CreateCopy() from gtiff file does not initialize AREA_OR_POINT metadata

2012-05-31 Thread Even Rouault
Le jeudi 31 mai 2012 19:47:38, Etienne Tourigny a écrit :
> When using a driver's CreateCopy function to copy a source dataset in
> GTiff format, It seems that  the  AREA_OR_POINT metadata is not
> initialized.
> 
> This is seemingly  for performance reasons as shown in the code below.
>  However, it has the unwanted side-effect that the AREA_OR_POINT
> metadata item is not copied over in most (all?) drivers.
> 
> This may be worth fixing and certainly worth being documented somewhere.
> Are there other drivers which have the same behaviour?
> 
> char **GTiffDataset::GetMetadata( const char * pszDomain )
> {
> [...]
> /* FIXME ? Should we call LookForProjection() to load
> GDALMD_AREA_OR_POINT ? */
> /* This can impact performances */
> 
> return oGTiffMDMD.GetMetadata( pszDomain );
> }

See http://trac.osgeo.org/gdal/ticket/4691 for analysis and fix. I didn't feel 
that to be critical enough to backport in 1.9 branch (the GTiff driver becoming 
so complex that mastering all code path combinations is really challenging)

> 
> regards,
> Etienne
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] GDALGetMaskFlags() bug with GTOPO30 data

2012-05-31 Thread Craig Bruce
Even Rouault  wrote:

> If you do GetMaskBand().GetMaskFlags(), then it will return 0x1, since
> the mask band itself has no mask.

Oops, that is what I did.  Thanks.

--+--+--
Dr. Craig S. Bruce| Ph 819-771-8303 x205 | CubeWerx Inc.
Senior Software Developer |   Fax 819-771-8388   |  Gatineau, Québec, Canada
csbr...@cubewerx.com  |  http://csbruce.com/ |  http://www.cubewerx.com/
--+--+--
 "Ogden's Law: The sooner you fall behind,
the more time you have to catch up."
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] GDALGetMaskFlags() bug with GTOPO30 data

2012-05-31 Thread Even Rouault
Le jeudi 31 mai 2012 20:41:14, Craig Bruce a écrit :
> I have run into a bug using GDALGetMaskFlags() with GTOPO30 data with
> the GDAL 1.9.0 C API.  The test data includes a NoData value:
> 
> [dev:~] gdalinfo /cw/testdata/gtopo30/w180s60.dem
> Driver: EHdr/ESRI .hdr Labelled
> ...
> Band 1 Block=7200x1 Type=Int16, ColorInterp=Undefined
>   NoData Value=-
> 
> When I call GDALGetMaskFlags(), I get back 0x01 which corresponds to
> GMF_ALL_VALID, meaning that the image is fully opaque.  I was hoping to
> discard the mask band in such a case as an optimization to avoid reading
> mask samples.  However, it appears that the GDALGetMaskFlags() is returing
> GMF_ALL_VALID by mistake and should be returning GMF_NODATA (0x08) instead.
> If I use the mask returned from GDALGetMaskBand(), it gives me the proper,
> variable mask values, so the bug is in falsely reporting the type of the
> mask band.

I cannot replicate, at least with the following Python script, that displays 8 
as expected :

from osgeo import gdal
ds = gdal.GetDriverByName('EHdr').Create('test.bil', 1, 1)
ds.GetRasterBand(1).SetNoDataValue(-)
ds = None
ds = gdal.Open('test.bil')
print(ds.GetRasterBand(1).GetMaskFlags())

I somehow suspect you didn't write exactly what you did and/or your 
expectations are wrong because there's no other way of getting the mask flags. 
If you do GetMaskBand().GetMaskFlags(), then it will return 0x1, since the 
mask band itself has no mask.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] GDALGetMaskFlags() bug with GTOPO30 data

2012-05-31 Thread Craig Bruce
I have run into a bug using GDALGetMaskFlags() with GTOPO30 data with
the GDAL 1.9.0 C API.  The test data includes a NoData value:

[dev:~] gdalinfo /cw/testdata/gtopo30/w180s60.dem
Driver: EHdr/ESRI .hdr Labelled
...
Band 1 Block=7200x1 Type=Int16, ColorInterp=Undefined
  NoData Value=-

When I call GDALGetMaskFlags(), I get back 0x01 which corresponds to
GMF_ALL_VALID, meaning that the image is fully opaque.  I was hoping to
discard the mask band in such a case as an optimization to avoid reading
mask samples.  However, it appears that the GDALGetMaskFlags() is returing
GMF_ALL_VALID by mistake and should be returning GMF_NODATA (0x08) instead.
If I use the mask returned from GDALGetMaskBand(), it gives me the proper,
variable mask values, so the bug is in falsely reporting the type of the
mask band.

--+--+--
Dr. Craig S. Bruce| Ph 819-771-8303 x205 | CubeWerx Inc.
Senior Software Developer |   Fax 819-771-8388   |  Gatineau, Québec, Canada
csbr...@cubewerx.com  |  http://csbruce.com/ |  http://www.cubewerx.com/
--+--+--
 "How many legs does a dog have if you call the tail a leg?  Four.
  Calling a tail a leg doesn't make it a leg." -- Abraham Lincoln
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] RE [Polluriel potentiel] Re: ogr ODBC problem [SOLVED]

2012-05-31 Thread Brent Fraser

Steve,

That's good news.

  I did run into the "spaces" problems on Windows (I had a space 
between the comma and the table name).  It caused the connection to fail.


Best Regards,
Brent Fraser


On 5/31/2012 12:14 PM, steve.tout...@inspq.qc.ca wrote:


for ogrinfo we were using, as explained here, 
http://mapserver.org/input/vector/VirtualSpatialData.html#steps-for-display

ogrinfo ODBC:User/Pwd@mssql__archives msStatut_station2002_2006
That was working on windows

Though, That doesn't work on our linux distro linux sles 11 sp1. It as 
to be (comma instead of space)

ogrinfo ODBC:User/Pwd@mssql__archives,msStatut_station2002_2006

But, For some reasons, this still doesn't work to get the list of 
tables on our linux distro

ogrinfo ODBC:User/Pwd@mssql__archives
But it is useless in my case.

Also, our virtual data file looks like this on windows


ODBC:User/Pwd@mssql__archives
dbo.msStatut_station2002_2006
wkbPoint
WGS84




That is working on windows

For our distro linux We need to add the table name
ODBC:User/Pwd@mssql__archives,msStatut_station2002_2006 



Perhaps it is not a windows vs linux issue but an OGR version issue.
Thanks for your help
Steve




*Brent Fraser *

2012-05-31 10:49


A
steve.tout...@inspq.qc.ca
cc
gdal-dev@lists.osgeo.org
Objet
[Polluriel potentiel]  Re: [gdal-dev] ogr ODBC problem











Steve,

 Here's a snippet from a MapServer map file I used to access a 
non-spatial MS SQL server via OGR+VRT+ODBC:


   TYPE POINT
   CONNECTIONTYPE OGR
   CONNECTION "

ODBC:username/password@WebMapDSN,v_MyPoints

   SELECT * FROM  v_MyPoints
   WHERE  PropertyID=%PropertyID%

*PointID*
wkbPoint
 x='SurfaceLongitude'/>

NAD83

"

   PROCESSING "CLOSE_CONNECTION=DEFER"

   DATA "v_MyPoints"

In my case I was able to use the view's primary key as the FID.  Hope 
this helps...

Best Regards,
Brent Fraser

On 5/31/2012 7:48 AM, _steve.tout...@inspq.qc.ca_ 
wrote:


Thanks Jeff
I got now OGR_ODBC: Table ?s???s!.? has no identified FID column.

I found that several users had this problem but found no solution. I 
don't have write access to this MSSQL server.


I'm connecting via ODBC to a non spatial table, but it contains 
latitude and longitude information. I will use it to define a 
OGRVRTDataSourceand create geometry from point.


Any clue on what I can do?
thanks
steve



*Jeff McKenna **__* 
*@lists.osgeo.org*
Envoyé par : _gdal-dev-bounces@lists.osgeo.org_ 



2012-05-30 17:06


A
_gdal-dev@lists.osgeo.org_ 
cc

Objet
Re: [gdal-dev] ogr ODBC problem













On 12-05-30 5:09 PM, _steve.tout...@inspq.qc.ca_ 
wrote:

>
> Hi!
> I use this command to get the tables from an ODBC connection
> ogrinfo ODBC:User/Pwd@DNS
>
> The connection is succesful but I get this error several times
> ERROR 1: No column definitions found for table '?s???s!.???',
> layer not usable.
>
> I used OGR ODBC for several months from a Windows server to a MSSQL 
server

> Now I'm migrating to linux and accessing the same MSSQL SERVER and I get
> this error.
>
> Note that if I connect with isql, I can connect and query the database
> without problem.
> So the problem really seems to be with OGR
>
> What can cause this No column definitions found for table error
> And why the table name looks like this  '?s???s!.???',

Hi Steve,

I was just debugging an ogrinfo command for MS4W/Oracle, and was
reminded of the trick to show more debug info at the commandline:

 set CPL_DEBUG=on

I'm going to keep that one in my back pocket from now on.

-jeff




--
Jeff McKenna
MapServer Consulting and Training Services_
__http://www.gatewaygeomatics.com/_


___
gdal-dev mailing list_
__gdal-dev@lists.osgeo.org_ _
__http://lists.osgeo.org/mailman/listinfo/gdal-dev_



___
gdal-dev mailing list
_gdal-dev@lists.osgeo.org_ 
_http://lists.osgeo.org/mailman/listinfo/gdal-dev_


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] RE [Polluriel potentiel] Re: ogr ODBC problem [SOLVED]

2012-05-31 Thread Steve . Toutant
for ogrinfo we were using, as explained here, 
http://mapserver.org/input/vector/VirtualSpatialData.html#steps-for-display
ogrinfo ODBC:User/Pwd@mssql__archives msStatut_station2002_2006
That was working on windows
Though, That doesn't work on our linux distro linux sles 11 sp1. It as to 
be (comma instead of space)
ogrinfo ODBC:User/Pwd@mssql__archives,msStatut_station2002_2006
But, For some reasons, this still doesn't work to get the list of tables 
on our linux distro
ogrinfo ODBC:User/Pwd@mssql__archives
But it is useless in my case.

Also, our virtual data file looks like this on windows


ODBC:User/Pwd@mssql__archives 
dbo.msStatut_station2002_2006 
wkbPoint 
WGS84
 



That is working on windows

For our distro linux We need to add the table name
ODBC:User/Pwd@mssql__archives,msStatut_station2002_2006
 


Perhaps it is not a windows vs linux issue but an OGR version issue.
Thanks for your help
Steve




Brent Fraser  
2012-05-31 10:49

A
steve.tout...@inspq.qc.ca
cc
gdal-dev@lists.osgeo.org
Objet
[Polluriel potentiel]  Re: [gdal-dev] ogr ODBC problem








Steve,

  Here's a snippet from a MapServer map file I used to access a 
non-spatial MS SQL server via OGR+VRT+ODBC:

TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "

 
ODBC:username/password@WebMapDSN,v_MyPoints
   
SELECT * FROM  v_MyPoints 
WHERE  PropertyID=%PropertyID%

PointID
wkbPoint

NAD83

"

PROCESSING "CLOSE_CONNECTION=DEFER"

DATA "v_MyPoints"

In my case I was able to use the view's primary key as the FID.  Hope this 
helps...
Best Regards,
Brent Fraser

On 5/31/2012 7:48 AM, steve.tout...@inspq.qc.ca wrote: 

Thanks Jeff 
I got now OGR_ODBC: Table ?s???s!.? has no identified FID column. 

I found that several users had this problem but found no solution. I don't 
have write access to this MSSQL server. 

I'm connecting via ODBC to a non spatial table, but it contains latitude 
and longitude information. I will use it to define a OGRVRTDataSource and 
create geometry from point. 

Any clue on what I can do? 
thanks 
steve 




Jeff McKenna @lists.osgeo.org 
Envoyé par : gdal-dev-boun...@lists.osgeo.org 
2012-05-30 17:06 


A
gdal-dev@lists.osgeo.org 
cc

Objet
Re: [gdal-dev] ogr ODBC problem










On 12-05-30 5:09 PM, steve.tout...@inspq.qc.ca wrote:
> 
> Hi!
> I use this command to get the tables from an ODBC connection
> ogrinfo ODBC:User/Pwd@DNS
> 
> The connection is succesful but I get this error several times
> ERROR 1: No column definitions found for table '?s???s!.???',
> layer not usable.
> 
> I used OGR ODBC for several months from a Windows server to a MSSQL 
server
> Now I'm migrating to linux and accessing the same MSSQL SERVER and I get
> this error.
> 
> Note that if I connect with isql, I can connect and query the database
> without problem.
> So the problem really seems to be with OGR
> 
> What can cause this No column definitions found for table error
> And why the table name looks like this  '?s???s!.???',

Hi Steve,

I was just debugging an ogrinfo command for MS4W/Oracle, and was
reminded of the trick to show more debug info at the commandline:

  set CPL_DEBUG=on

I'm going to keep that one in my back pocket from now on.

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev 




___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] CreateCopy() from gtiff file does not initialize AREA_OR_POINT metadata

2012-05-31 Thread Etienne Tourigny
When using a driver's CreateCopy function to copy a source dataset in
GTiff format, It seems that  the  AREA_OR_POINT metadata is not
initialized.

This is seemingly  for performance reasons as shown in the code below.
 However, it has the unwanted side-effect that the AREA_OR_POINT
metadata item is not copied over in most (all?) drivers.

This may be worth fixing and certainly worth being documented somewhere.
Are there other drivers which have the same behaviour?

char **GTiffDataset::GetMetadata( const char * pszDomain )
{
[...]
/* FIXME ? Should we call LookForProjection() to load
GDALMD_AREA_OR_POINT ? */
/* This can impact performances */

return oGTiffMDMD.GetMetadata( pszDomain );
}

regards,
Etienne
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] RE [Polluriel potentiel] Re: ogr ODBC problem

2012-05-31 Thread Brent Fraser

Steve,

  In my case I was getting OGR to get data from a database view, but it 
could have been a table.  I think OGR needs (would like?) to know which 
column it can use for unque id.  I would expect your view (or table) 
would have a unique key column otherwise relation operations (like 
joins) can be a problem (the db admin should be able to tell you).


Perhaps the ODBC system on Linux doesn't give OGR enough info about the 
columns to automatically identify the Primary Key column.  If you are 
testing with ogrinfo you could user the "-fid" option after you've 
identified the Primary Key column?


Best Regards,
Brent Fraser


On 5/31/2012 10:11 AM, steve.tout...@inspq.qc.ca wrote:


Thanks Brent for your answer.

But view's primary key?
I'm missing something here...What do you mean by that? Do you mean a 
column with a unique id in the view?
There is no such column in my view. Is ogr now needs a unique id in a 
view? Because it was working before I migrate to linux with a recent 
vertsion of gdal.


Also, My problem is before using CONNECTIONTYPE OGR
   CONNECTION "

A simple ogrinfo like this
ODBC:username/password@WebMapDSN,v_MyPoints

Gives me the error OGR_ODBC: Table ?s???s!.? has no identified 
FID column.


Thanks in advance
Steve





*Brent Fraser *

2012-05-31 10:49


A
steve.tout...@inspq.qc.ca
cc
gdal-dev@lists.osgeo.org
Objet
[Polluriel potentiel]  Re: [gdal-dev] ogr ODBC problem











Steve,

 Here's a snippet from a MapServer map file I used to access a 
non-spatial MS SQL server via OGR+VRT+ODBC:


   TYPE POINT
   CONNECTIONTYPE OGR
   CONNECTION "

ODBC:username/password@WebMapDSN,v_MyPoints

   SELECT * FROM  v_MyPoints
   WHERE  PropertyID=%PropertyID%

*PointID*
wkbPoint
 x='SurfaceLongitude'/>

NAD83

"

   PROCESSING "CLOSE_CONNECTION=DEFER"

   DATA "v_MyPoints"

In my case I was able to use the view's primary key as the FID.  Hope 
this helps...

Best Regards,
Brent Fraser

On 5/31/2012 7:48 AM, _steve.tout...@inspq.qc.ca_ 
wrote:


Thanks Jeff
I got now OGR_ODBC: Table ?s???s!.? has no identified FID column.

I found that several users had this problem but found no solution. I 
don't have write access to this MSSQL server.


I'm connecting via ODBC to a non spatial table, but it contains 
latitude and longitude information. I will use it to define a 
OGRVRTDataSourceand create geometry from point.


Any clue on what I can do?
thanks
steve



*Jeff McKenna **__* 
*@lists.osgeo.org*
Envoyé par : _gdal-dev-bounces@lists.osgeo.org_ 



2012-05-30 17:06


A
_gdal-dev@lists.osgeo.org_ 
cc

Objet
Re: [gdal-dev] ogr ODBC problem













On 12-05-30 5:09 PM, _steve.tout...@inspq.qc.ca_ 
wrote:

>
> Hi!
> I use this command to get the tables from an ODBC connection
> ogrinfo ODBC:User/Pwd@DNS
>
> The connection is succesful but I get this error several times
> ERROR 1: No column definitions found for table '?s???s!.???',
> layer not usable.
>
> I used OGR ODBC for several months from a Windows server to a MSSQL 
server

> Now I'm migrating to linux and accessing the same MSSQL SERVER and I get
> this error.
>
> Note that if I connect with isql, I can connect and query the database
> without problem.
> So the problem really seems to be with OGR
>
> What can cause this No column definitions found for table error
> And why the table name looks like this  '?s???s!.???',

Hi Steve,

I was just debugging an ogrinfo command for MS4W/Oracle, and was
reminded of the trick to show more debug info at the commandline:

 set CPL_DEBUG=on

I'm going to keep that one in my back pocket from now on.

-jeff




--
Jeff McKenna
MapServer Consulting and Training Services_
__http://www.gatewaygeomatics.com/_


___
gdal-dev mailing list_
__gdal-dev@lists.osgeo.org_ _
__http://lists.osgeo.org/mailman/listinfo/gdal-dev_



___
gdal-dev mailing list
_gdal-dev@lists.osgeo.org_ 
_http://lists.osgeo.org/mailman/listinfo/gdal-dev_


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Building gdal with opencl support on windows

2012-05-31 Thread Jeff McKenna
On 12-05-31 1:04 PM, Piotr Tracz wrote:
> I will post mine (just need to grab correct revision from SVN) however
> current OpenCL support is really "a technology preview" - after many
> tests I noticed it often locks card driver, usualy is slower than
> multithreading and gives unaccurate results. In my oppinion current
> OpenCL support is great starting point to dig into that technology but
> not much usable to process real data...
> 

Piotr,

Could you create a wiki page at
http://trac.osgeo.org/gdal/wiki/BuildHints in the "External Library
Issues" section for opencl?  And then point to it back here on the
mailing list.  Thanks!

-jeff





-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] RE [Polluriel potentiel] Re: ogr ODBC problem

2012-05-31 Thread Steve . Toutant
Thanks Brent for your answer.

But view's primary key?
I'm missing something here...What do you mean by that? Do you mean a 
column with a unique id in the view?
There is no such column in my view. Is ogr now needs a unique id in a 
view? Because it was working before I migrate to linux with a recent 
vertsion of gdal.

Also, My problem is before using CONNECTIONTYPE OGR
CONNECTION "

A simple ogrinfo like this
ODBC:username/password@WebMapDSN,v_MyPoints

Gives me the error OGR_ODBC: Table ?s???s!.? has no identified FID 
column. 

Thanks in advance
Steve






Brent Fraser  
2012-05-31 10:49

A
steve.tout...@inspq.qc.ca
cc
gdal-dev@lists.osgeo.org
Objet
[Polluriel potentiel]  Re: [gdal-dev] ogr ODBC problem








Steve,

  Here's a snippet from a MapServer map file I used to access a 
non-spatial MS SQL server via OGR+VRT+ODBC:

TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "

 
ODBC:username/password@WebMapDSN,v_MyPoints
   
SELECT * FROM  v_MyPoints 
WHERE  PropertyID=%PropertyID%

PointID
wkbPoint

NAD83

"

PROCESSING "CLOSE_CONNECTION=DEFER"

DATA "v_MyPoints"

In my case I was able to use the view's primary key as the FID.  Hope this 
helps...
Best Regards,
Brent Fraser

On 5/31/2012 7:48 AM, steve.tout...@inspq.qc.ca wrote: 

Thanks Jeff 
I got now OGR_ODBC: Table ?s???s!.? has no identified FID column. 

I found that several users had this problem but found no solution. I don't 
have write access to this MSSQL server. 

I'm connecting via ODBC to a non spatial table, but it contains latitude 
and longitude information. I will use it to define a OGRVRTDataSource and 
create geometry from point. 

Any clue on what I can do? 
thanks 
steve 




Jeff McKenna @lists.osgeo.org 
Envoyé par : gdal-dev-boun...@lists.osgeo.org 
2012-05-30 17:06 


A
gdal-dev@lists.osgeo.org 
cc

Objet
Re: [gdal-dev] ogr ODBC problem










On 12-05-30 5:09 PM, steve.tout...@inspq.qc.ca wrote:
> 
> Hi!
> I use this command to get the tables from an ODBC connection
> ogrinfo ODBC:User/Pwd@DNS
> 
> The connection is succesful but I get this error several times
> ERROR 1: No column definitions found for table '?s???s!.???',
> layer not usable.
> 
> I used OGR ODBC for several months from a Windows server to a MSSQL 
server
> Now I'm migrating to linux and accessing the same MSSQL SERVER and I get
> this error.
> 
> Note that if I connect with isql, I can connect and query the database
> without problem.
> So the problem really seems to be with OGR
> 
> What can cause this No column definitions found for table error
> And why the table name looks like this  '?s???s!.???',

Hi Steve,

I was just debugging an ogrinfo command for MS4W/Oracle, and was
reminded of the trick to show more debug info at the commandline:

  set CPL_DEBUG=on

I'm going to keep that one in my back pocket from now on.

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev 




___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Building gdal with opencl support on windows

2012-05-31 Thread Piotr Tracz

W dniu 2012-05-29 13:15, Yogesh Dahiya pisze:


If anyone knows how to hack nmake.opt and alg/makefile.vc to build 
gdal with opencl support on windows, please do reply.



I will post mine (just need to grab correct revision from SVN) however 
current OpenCL support is really "a technology preview" - after many 
tests I noticed it often locks card driver, usualy is slower than 
multithreading and gives unaccurate results. In my oppinion current 
OpenCL support is great starting point to dig into that technology but 
not much usable to process real data...


/Piotr

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr ODBC problem

2012-05-31 Thread Brent Fraser

Steve,

  Here's a snippet from a MapServer map file I used to access a 
non-spatial MS SQL server via OGR+VRT+ODBC:


TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "

ODBC:username/password@WebMapDSN,v_MyPoints

SELECT * FROM v_MyPoints
WHERE  PropertyID=%PropertyID%

*PointID*
wkbPoint
x='SurfaceLongitude'/>

NAD83

"

PROCESSING "CLOSE_CONNECTION=DEFER"

DATA "v_MyPoints"

In my case I was able to use the view's primary key as the FID.  Hope 
this helps...


Best Regards,
Brent Fraser


On 5/31/2012 7:48 AM, steve.tout...@inspq.qc.ca wrote:


Thanks Jeff
I got now OGR_ODBC: Table ?s???s!.? has no identified FID column.

I found that several users had this problem but found no solution. I 
don't have write access to this MSSQL server.


I'm connecting via ODBC to a non spatial table, but it contains 
latitude and longitude information. I will use it to define a 
OGRVRTDataSourceand create geometry from point.


Any clue on what I can do?
thanks
steve




*Jeff McKenna @lists.osgeo.org*
Envoyé par : gdal-dev-boun...@lists.osgeo.org

2012-05-30 17:06


A
gdal-dev@lists.osgeo.org
cc

Objet
Re: [gdal-dev] ogr ODBC problem











On 12-05-30 5:09 PM, steve.tout...@inspq.qc.ca wrote:
>
> Hi!
> I use this command to get the tables from an ODBC connection
> ogrinfo ODBC:User/Pwd@DNS
>
> The connection is succesful but I get this error several times
> ERROR 1: No column definitions found for table '?s???s!.???',
> layer not usable.
>
> I used OGR ODBC for several months from a Windows server to a MSSQL 
server

> Now I'm migrating to linux and accessing the same MSSQL SERVER and I get
> this error.
>
> Note that if I connect with isql, I can connect and query the database
> without problem.
> So the problem really seems to be with OGR
>
> What can cause this No column definitions found for table error
> And why the table name looks like this  '?s???s!.???',

Hi Steve,

I was just debugging an ogrinfo command for MS4W/Oracle, and was
reminded of the trick to show more debug info at the commandline:

  set CPL_DEBUG=on

I'm going to keep that one in my back pocket from now on.

-jeff




--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev




___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] ogr ODBC problem

2012-05-31 Thread Steve . Toutant
Thanks Jeff
I got now OGR_ODBC: Table ?s???s!.? has no identified FID column.

I found that several users had this problem but found no solution. I don't 
have write access to this MSSQL server.

I'm connecting via ODBC to a non spatial table, but it contains latitude 
and longitude information. I will use it to define a OGRVRTDataSource and 
create geometry from point.

Any clue on what I can do?
thanks
steve






Jeff McKenna @lists.osgeo.org 
Envoyé par : gdal-dev-boun...@lists.osgeo.org
2012-05-30 17:06

A
gdal-dev@lists.osgeo.org
cc

Objet
Re: [gdal-dev] ogr ODBC problem








On 12-05-30 5:09 PM, steve.tout...@inspq.qc.ca wrote:
> 
> Hi!
> I use this command to get the tables from an ODBC connection
> ogrinfo ODBC:User/Pwd@DNS
> 
> The connection is succesful but I get this error several times
> ERROR 1: No column definitions found for table '?s???s!.???',
> layer not usable.
> 
> I used OGR ODBC for several months from a Windows server to a MSSQL 
server
> Now I'm migrating to linux and accessing the same MSSQL SERVER and I get
> this error.
> 
> Note that if I connect with isql, I can connect and query the database
> without problem.
> So the problem really seems to be with OGR
> 
> What can cause this No column definitions found for table error
> And why the table name looks like this  '?s???s!.???',

Hi Steve,

I was just debugging an ogrinfo command for MS4W/Oracle, and was
reminded of the trick to show more debug info at the commandline:

   set CPL_DEBUG=on

I'm going to keep that one in my back pocket from now on.

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] multiple bands in gdal2xyz.py should be comma separated

2012-05-31 Thread Tom van Tilburg

Hi,

It seems that gdal2xyz.py currently supports the output of multiple 
raster bands using:

gdal2xyz.py -band 1 -band 2 etc

However, when I use this in combination with the parameter -csv I do not 
get the extected comma in between the values of my bands.

Extected:   5.604, 50.765, 3, 2
Received: 5.604, 50.765, 3  2 <== "notice the missing komma"

I briefly checked the python code and it seems to be an addition to 
'band_format' is needed.


band_format = ("%g " * len(bands)).rstrip() + '\n'

should become something like

band_format = (("%g " + delim) * len(bands)).rstrip(",") + '\n'


Cheers,
Tom
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev