Re: [gdal-dev] [EXTERNAL] Re: GDAL 3.4.0 is released

2021-11-10 Thread Clay, Bruce
Jeff:
  Can you add an example to the mapserver set of examples to add support for a 
slippy map (XYZ)?  I can not find anything that shows how to add a local slippy 
map directory tree to the map file.

Bruce


From: gdal-dev  on behalf of Jeff McKenna 

Sent: Monday, November 8, 2021 12:11 PM
To: gdal-dev@lists.osgeo.org 
Subject: [EXTERNAL] Re: [gdal-dev] GDAL 3.4.0 is released

All MapServer demo services (over 10+ OGC services) have been updated to
GDAL 3.4.0 : 
https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fdemo.mapserver.org%2F&data=04%7C01%7Cbclay%40infoscitex.com%7C52f6b9a5246f457b13c408d9a2dae757%7C3430c5de5e6f4f9d9d9690e985038b58%7C0%7C0%7C637719885363705518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=p9jTVg8PKsaX899y62Oa3WIZsVN00Ita1O1nKYoVIeU%3D&reserved=0


-jeff



--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Fgatewaygeo.com%2F&data=04%7C01%7Cbclay%40infoscitex.com%7C52f6b9a5246f457b13c408d9a2dae757%7C3430c5de5e6f4f9d9d9690e985038b58%7C0%7C0%7C637719885363705518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=liq1maeD%2B%2B%2BnXz%2FMOg900v2GYaooSvcA6S2G06roBTY%3D&reserved=0




On 2021-11-08 9:42 a.m., Even Rouault wrote:
> Hi,
>
> On behalf of the GDAL/OGR development team and community, I am pleased to
> announce the release of GDAL/OGR 3.4.0. GDAL/OGR is a C++ geospatial data
> access library for raster and vector file formats, databases and web
> services.
> It includes bindings for several languages, and a variety of command line
> tools.
>
> 
> https://usg02.safelinks.protection.office365.us/?url=http%3A%2F%2Fgdal.org%2F&data=04%7C01%7Cbclay%40infoscitex.com%7C52f6b9a5246f457b13c408d9a2dae757%7C3430c5de5e6f4f9d9d9690e985038b58%7C0%7C0%7C637719885363705518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=uyFxegtdVqazi%2BpUzHW6Y2vx5UVrwn97Xe4jxfgr9X0%3D&reserved=0
>
> The 3.4.0 release is a new feature release with the following highlights:
>
> * [RFC 
> 81](https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgdal.org%2Fdevelopment%2Frfc%2Frfc81_coordinate_epoch.html&data=04%7C01%7Cbclay%40infoscitex.com%7C52f6b9a5246f457b13c408d9a2dae757%7C3430c5de5e6f4f9d9d9690e985038b58%7C0%7C0%7C637719885363705518%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=IgtdgnC%2FtHwYr4jd5f2yGKj6hOxsgc6v1irtuDL30Hc%3D&reserved=0):
>Support for coordinate epochs in geospatial formats.
>Implemented in FlatGeoBuf, GeoPackage, MEM, VRT
> * New GDAL drivers:
>- 
> [Zarr](https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgdal.org%2Fdrivers%2Fraster%2Fzarr.html&data=04%7C01%7Cbclay%40infoscitex.com%7C52f6b9a5246f457b13c408d9a2dae757%7C3430c5de5e6f4f9d9d9690e985038b58%7C0%7C0%7C637719885363715511%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fv3Igmm8lc5xOStbrBonSoDQSboomAbiyWVKDwEpEvo%3D&reserved=0):
>  read/write support for ZarrV2 (and experimental V3), using 2D
> classic raster
>  API or multidimensional API:
>- 
> [STACIT](https://usg02.safelinks.protection.office365.us/?url=https%3A%2F%2Fgdal.org%2Fdrivers%2Fraster%2Fstacit.html&data=04%7C01%7Cbclay%40infoscitex.com%7C52f6b9a5246f457b13c408d9a2dae757%7C3430c5de5e6f4f9d9d9690e985038b58%7C0%7C0%7C637719885363715511%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=rYNT%2FG8BizGyNgTZiSPoGY%2Bwj1hU%2B%2FZHGPBZkXB8hRQ%3D&reserved=0):
>  Spatio-Temporal Asset Catalog Items as virtual mosaics
> * Other improvements:
>- number of enhancements in file system operations of /vsigs/
>- NITF: additions to comply with NITF Version 2.1 Commercial Dataset
>  Requirements Document (NCDRD)
>- ODBC and PGeo: multiple fixes and improvements
>- SAFE (Sentinel1): multiple improvements related to SLC/calibration
> (change
>  subdataset naming)
>- multidimensional API: caching, and other improvements
> * Code linting and security fixes
> * MDB driver (Java based) mark as deprecated. Planned for removal for
> GDAL 3.5.
>ODBC driver is the preferred solution (with up-to-date MDBTools
> library on
>non-Windows platforms)
> * Writing side of Tiger driver deprecated and will be removed in GDAL 3.5
> * Remainder: DODS, JPEG2000(Jasper), JPEGLS, MG4LIDAR, FUJIBAS, IDA,
> INGR and
>vector driver ARCGEN, ArcObjects, CLOUDANT, COUCHDB, DB2, DODS, FME,
> GEOMEDIA,
>GTM, INGRES, MONGODB, REC, WALK are planned for removal in GDAL 3.5.
> As well
>as Perl bindings
>
> More complete information on the new features and fixes in the 3.4.0
> release can be found at:
>
>
> https://usg02.

[gdal-dev] gdal2tiles.py - next step

2021-11-08 Thread Clay, Bruce
I am trying to add WMTS / TMS to our current WMS mapserver.  I have some map 
tiles generated by gdal2tiles.py that appear to be valid.  There is a 
tilemapresource.xml file in the root of each tile set.

I am not sure the correct forum to ask this question but how do I configure 
mapserver to serve one of these tile sets when there is not a corresponding 
original source to put in the mapserver configuration file? I added the 
mapcache.xml file as follows

   
 H:/ms4w/cache/BlueMarbleTiles_200401


   
  bluemarble_src
  bm_200401
  5 5
  PNG
  WGS84

  
Blue Marble 200401
Blue Marble - January 2004 - tiles

  Blue Marble
  tiles

  
   

   
  bluemarble_src
  bm_200401
  5 5
  PNG
  WGS84

  
Blue Marble 200401
Blue Marble - January 2004 - tiles

  Blue Marble
  tiles

  
   

When I select the tile set in QGIS using
http://localhost/mapcache/wmts?service=wmts&request=getcapabilities&version=1.0.0

All of the layers show as available layers but the only ones that show on the 
map are the ones that have an entry in the WMS map file.

>From my understanding the tilemapresource.xml file generate by gdal2tiles.py 
>specifies the zoom levels and resolution but it is not specified in any of the 
>configuration files.

Any suggestions would be greatly appreciated.

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


Re: [gdal-dev] [EXTERNAL] Re: ogr2ogr does not convert OSM polygons

2021-11-08 Thread Clay, Bruce
Jukka:
  I apologize for the delay getting back to you.  Thanks you for your help. I 
am posting this as the solution that worked for me in case it will help anyone 
else.

I created a batch file (CreateandLoadOsmSchema.bat) with the following calls:

"C:\Program Files\PostgreSQL\12\bin\psql" -h data-trust -d osm_%1  -p 5432 -U 
postgres -c "CREATE SCHEMA %2";

Z:\OpenStreetMap\release-1916-x64-gdal-mapserver\bin\ogr2ogr -f PostgreSQL 
PG:"dbname='osm_%1' host='port='5432' user='postgres' 
password=''" -lco schema=%2 %3  --config OSM_MAX_TMPFILE_SIZE 1024

then I created a separate batch file (CreateAndLoadAfricaOsm.bat) that 
contained:

set GDAL_DRIVER_PATH=Z:\OpenStreetMap\release-1916-x64-gdal-mapserver\bin
set PGPASSWORD=

cd ..\africa

CALL ..\scripts\CreateAndLoadOsmSchema algeria algeria-latest.osm.pbf
CALL ..\scripts\CreateandLoadOsmSchema angola angola-latest.osm.pbf

added a line for each PBF that I downloaded

This created a postgresql /postgis table for each dataset.

Bruce



____
From: Rahkonen Jukka (MML) 
Sent: Tuesday, November 2, 2021 3:35 PM
To: Clay, Bruce 
Cc: 'gdal-dev@lists.osgeo.org' 
Subject: Re: [EXTERNAL] Re: ogr2ogr does not convert OSM polygons


Hi,



Please take care to send mail also to the list.



The error that you get means probably that the Proj coordinate transformation 
library finds an older version of the proj.db file. With the gisinternals 
installation that file is in [gdal_installation_directory]\bin\proj7\share. 
Environmental variable PROJ_LIB should point into there. How did you launch 
ogr2ogr after installation? If you installed from the zip file you must run 
first the batch file “sdkshell.bat” for setting the paths and environment 
variables. If you used installer then you should launch GDAL command window 
from the shortcuts. In both cases when settings are OK you can run ogr2ogr 
simply as “ogr2ogr”.



Other_relations contain geometries which are of geometry type 
“GeometryCollection”. Unfortunately QGIS has very little support for 
GeometryCollections. You can see the attributes but not the geometries. If you 
are interested in the relations you must use some workarounds with QGIS or use 
other programs. For example OpenJUMP can do pretty well with relations but it 
is not so well documented.



-Jukka Rahkonen-



Lähettäjä: Clay, Bruce 
Lähetetty: tiistai 2. marraskuuta 2021 20.35
Vastaanottaja: Rahkonen Jukka (MML) 
Aihe: Re: [EXTERNAL] Re: ogr2ogr does not convert OSM polygons



Jukka:

  I upgraded to 3.4.0 from sysinternals.  All tables appear to be going in ok 
but I do get an error message for each table (shown below).  QGIS shows the 
SRID is 4326.  "other_relations" has a geometry column and it loads in QGIS but 
the geometry does not show.  It appears I can get what I need for my task, just 
annoying messages.



Should "other_relations" show in QGIS?



Thanks for you help.



Bruce



Z:\OpenStreetMap\release-1916-x64-gdal-mapserver\bin\ogr2ogr -f PostgreSQL 
PG:"dbname='open_street_map' host='hostname' port='5432' user='postgres' 
password='pwd'" -lco schema=algeria algeria-latest.osm.pbf  --config 
OSM_MAX_TMPFILE_SIZE 1024

0...10...20...30...40.ERROR 1: PROJ: proj_create_from_database: cannot build 
geodeticCRS 4326: SQLite error on SELECT extent.description, extent.south_lat, 
extent.north_lat, extent.west_lon, extent.east_lon, scope.scope, (CASE WHEN 
scope.scope LIKE '%large scale%' THEN 0 ELSE 1 END) AS score FROM usage JOIN 
extent ON usage.extent_auth_name = extent.auth_name AND usage.extent_code = 
extent.code JOIN scope ON usage.scope_auth_name = scope.auth_name AND 
usage.scope_code = scope.code WHERE object_table_name = ? AND object_auth_name 
= ? AND object_code = ? ORDER BY score, usage.auth_name, usage.code: no such 
table: usage

..50...60...70...80...90...100 - done.



From: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Sent: Tuesday, November 2, 2021 12:32 PM
To: Clay, Bruce mailto:bc...@infoscitex.com>>
Subject: VS: [EXTERNAL] Re: ogr2ogr does not convert OSM polygons



Actually, it was GDAL 3.3.1 from OSGeo4W installer.



-Jukka-



Lähettäjä: Clay, Bruce mailto:bc...@infoscitex.com>>
Lähetetty: tiistai 2. marraskuuta 2021 18.19
Vastaanottaja: Rahkonen Jukka (MML) 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
Aihe: Re: [EXTERNAL] Re: ogr2ogr does not convert OSM polygons



Jukka:

  Thanks for your reply.



I was in the progress of loading all OSM so I started with Africa and saw the 
same thing for all pbf files.  You can pick a small one such as 
algeria-latest.osm.pbf.  In my post I  just replaced the country name with the 
word "country" to be generic.  All of the files came from the website you 
mentioned.



I am using

[gdal-dev] ogr2ogr does not convert OSM polygons

2021-11-02 Thread Clay, Bruce
When I convert a OSM pbf file to postgres using the following script it does 
not create a multipolygon table

ogr2ogr -f PostgreSQL PG:"dbname='open_street_map' host='db-host' port='5432' 
user='postgres' password='pwd'" -lco schema=country country_pbf  --config 
OSM_MAX_TMPFILE_SIZE 1024

When I do the same thing using osm2pgsql (shown below) it creates the polygon 
table but not the other_relations table

osm2pgsql -H hostname -U postgres -d open_street_map 
--output-pgsql-schema=country --create --latlong -G --hstore 
--tag-transform-script 
/OpenStreetMap/openstreetmap-carto-master/openstreetmap-carto.lua -C 2500 
--number-processes 5 -S 
/OpenStreetMap/openstreetmap-carto-master/openstreetmap-carto.style 
country-latest.osm.pbf.

I did not see this problem when I Googled.

Is this a known issue and is there a work around?

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


Re: [gdal-dev] [EXTERNAL] Re: Converting OBJ to Geojson files with ogr2ogr

2020-12-02 Thread Clay, Bruce
Take a look at CityXml / CityGml and CityJson.  There is partial support at 
least in GDAL based on web searches.  Also some support for QGIS through a 
plugin


Bruce



From: gdal-dev  on behalf of Paul Harwood 

Sent: Wednesday, December 2, 2020 5:31 AM
To: Andrew C Aitchison
Cc: gdal-dev@lists.osgeo.org
Subject: [EXTERNAL] Re: [gdal-dev] Converting OBJ to Geojson files with ogr2ogr

.OBJ is a simple object mesh  (or to put it in more traditional terms: TIN) - 
it has shape but no data values and is not geolocated.

I don't think there is any driver for OGR that will read .OBJ.

You are going to problems with geolocation if you write your own. Geojson 
requires that the geometries are geolocated - and in the current version that 
they are in epsg:4326. That is not totally impossible - people have been using 
.dxf files for gis data for decades and that format is also not in theory 
geolocated. It is not a trivial problem though.

I guess I would ask the usual question .. why?

- what are you actually trying to achieve and why a GIS format like GeoJSON?

- If you have to use GeoJSON - I am guessing you are transferring some data to 
something that reads GeoJSON only? In that case - can your source produce .dxf? 
OGR can read .dxf.

- If you only have the source in .OBJ - what other formats can the destination 
read? Although, if you only have the source in .obj, I very much doubt any of 
the GIS tools like GDAL are going to be able to help you. It just is not a 
format used in GIS.

It is a problem we solved in the ViRGiS 
project
 - since .obj is used a lot in VR. There we used an existing library to read 
the .obj files - but that is in C# and I doubt that would help you.

On Tue, 1 Dec 2020 at 20:15, Andrew C Aitchison 
mailto:and...@aitchison.me.uk>> wrote:
On Tue, 1 Dec 2020, Brandon Biggs wrote:

> Hello,
> I am wondering how to convert an obj file to a geojson file? I am using 
> ogr2ogr with the command:
> Ogr2ogr -f geojson output.geojson input.obj
> But get the error that ogr2ogr does not have an OBJ driver. I looked on:
> the vector drivers 
> page>
> but am unable to find a simple obj converter. I am wondering if there is such 
> a thing? I am probably going to write my own that does what I want, because 
> OBJ is so simple, I was just wondering if GDAL could already do it.

I've never heard of OBJ, but that doesn't mean much.

If you only want a read-only ogr driver you might want to look at

https://gdal.org/tutorials/vector_python_driver.html
if you would find a quick-n-dirty python quicker to write than C++.

--
Andrew C. Aitchison Kendal, UK
and...@aitchison.me.uk
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] extract from geopdf with transparency

2020-06-17 Thread Clay, Bruce
We have a GeoPDF file that contains multiple layers, base layer plus several 
transparent overlays and some vectors.

We can pull each or all image layers and the vector layers from the PDF and 
save them in separate files.  We cannot get the transparent image layers to 
extract and keep their transparency.


Is there a way to extract image layers and keep their transparency?  We have 
tried extracting as tif, jpeg, png and none of them work.  The gif driver only 
supports single band images .  While the layer we are trying to extract is a 
stroke text overlay and should only be one color it still will not extract the 
image


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

[gdal-dev] ECW to JP2000

2019-12-06 Thread Clay, Bruce
when I use gdal_translate to convert an ECW file to JP2000 it ends up 9 times 
larger.  I could not find any options to control the compression like we can 
with Geotiff.  Is there a way to get a compressed JP2000 image?


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

[gdal-dev] ogr2ogr load shape in tablespace

2013-09-12 Thread Clay, Bruce
I need to load a set of shapefiles into a tablespace (on a different hard 
drive) where I have more dataspace.  I have been using ogr2ogr to load 
shapefile up to this point using windows command prompt and batch files.  I 
created a tablespace using pgAdminIII but I can not find a way to assign the 
data to the tablespace from ogr2ogr.  I googled but did not find a way to do so.
 
Is there a way not listed in the help function or docs?
 
Bruce
 



This message and any enclosures are intended only for the addressee.  Please 
notify the sender by email if you are not the intended recipient.  If you are 
not the intended recipient, you may not use, copy, disclose, or distribute this 
message or its contents or enclosures to any other person and any such actions 
may be unlawful.  Ball reserves the right to monitor and review all messages 
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] CRS not defined with BMP

2012-11-26 Thread Clay, Bruce
I am using GDAL to convert CADRG files to BMP chips for an application written 
to only use BMP.  I have created the BMP chip, BMP world file and a 4326 prj 
file to indicate WGS 84.  When I use gdalinfo to look at the settings it always 
indicates  CRS is not defined.  QGis also says the CRS is not defined.  Is 
there a proper way to define a CRS for rasters that rely on a world file?

 

 

 

Bruce




This message and any enclosures are intended only for the addressee.  Please 

notify the sender by email if you are not the intended recipient.  If you are 

not the intended recipient, you may not use, copy, disclose, or distribute this 

message or its contents or enclosures to any other person and any such actions 

may be unlawful.  Ball reserves the right to monitor and review all messages 

and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] unresolved CPLAtomicAdd

2010-11-30 Thread Clay, Bruce
I have been using GDAL 1.7.1 for a while now in debug mode without problems.  I 
recently compiled GDAL in release mode and did not see any errors during the 
build process.  
 
When I build my application I get the following link error : "unresolved 
external symbol _CPLAtomicAdd".  I can see cpl_atomic_ops.obj after the build 
process so I know the method is getting compiled.  I don't have this error in 
debug mode. 

Has anyone seen this problem and have a fix?

Bruce

 

 

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] can not connect top postgis db using GDAL

2010-09-23 Thread Clay, Bruce
Frank:
  Thanks for the reply.  I tried again with"

strcat(connectBuf, "PG:dbname='postgis' host='' port='5432'
user='postgres' password='>Pwd>'");

*dataSource = OGRSFDriverRegistrar::Open(connectBuf
/*connectString.c_str() */, FALSE);

And still no connection and *dataSource was returned NULL.

I put a breakpoint in GdalErrorHandler and the code did not go there so
apparently no error was signaled during the connection attempt

I also tried:

L:\SupportLibraries\gdal-1.7.1\bin\release>ogrinfo -ro
PG:"host= user=postgres password="
FAILURE:
Unable to open datasource `PG:host= user=postgres
password='
 with the following drivers.
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> GMT
  -> ODBC
  -> PGeo
  -> PostgreSQL
  -> PCIDSK
  -> XPlane
  -> AVCBin
  -> AVCE00
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK


From the list we can see PostgrSQL but no reason was given for the
failure

Any other suggestions would be greatly appreciated.

Bruce



-Original Message-
From: Frank Warmerdam [mailto:warmer...@pobox.com] 
Sent: Thursday, September 23, 2010 5:05 PM
To: Clay, Bruce
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] can not connect top postgis db using GDAL

Clay, Bruce wrote:
> I can not connect to a posgresql/postgis database using GDAL.  I have 
> verified that the PostgreSql drivers are in the DLL by calling ogrinfo

> -formats.
> 
> PostgreSql is on the list
> 
>  
> 
> From c++ code I try the following:
> 
>  
> 
> strcat(connectBuf, "PG:\"dbname='postgis' host=' user='postgres' password=''\"");

Bruce,

You should not be including the extra escaped double quotes in the
connection
string.  You likely saw an example in this form intended for use at the
commandline where the quotes would be interpreted by the shell, and keep
the
whole connection string together as one argument.  Try:


strcat(connectBuf, "PG:dbname='postgis' host='http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] can not connect top postgis db using GDAL

2010-09-23 Thread Clay, Bruce
I can not connect to a posgresql/postgis database using GDAL.  I have
verified that the PostgreSql drivers are in the DLL by calling ogrinfo
-formats.

PostgreSql is on the list

 

From c++ code I try the following:

 

strcat(connectBuf, "PG:\"dbname='postgis' host=' user=postgis password=
dbname=postgis based on rhw online examples and I get an error message
indicating no password was supplied.

 

I can connect to the remote host usin pgAdminIII so I know the systems
can talk to each other.

 

Does anyone see what I might be doing wrong?  

 

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] problem reading arc from shapefile with OGR

2010-04-27 Thread Clay, Bruce
I created a shapefile in ArcMap with 5 objects.  The first two are
really a collection of many line strings that I copied from a Census
Tigerline file and the other three I created using the ArcMap editor arc
tool.  The attached file shows what the shapes look like.

 

I can read the two smaller objects using OGR without any problem.  They
have reasonable point counts and the X/Y data from the ones I looked at
in the debugger look valid.

 

I can not get to the point data in the larger three shapes.  The
geometry type shows up as linestrings but the point counts are way to
low (i.e 28, 10 and 3).

 

I tried to cast them into OGRCurve, OGRMultiLineString,
GeometryCollection and a few more I think but none of them worked.

 

Is there some special way to read data like this?

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.<>___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] tab delimited to shapefile

2009-11-18 Thread Clay, Bruce
Is there any way to use ogr2ogr to convert tab-delimited data such as
the geoname dot org files into shapefiles short of converting all tabs
to commas?

 

I created a VRT file that works with CSV files but I can not find any
way to convert tab-delimited data.

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] SQL results truncated

2009-11-04 Thread Clay, Bruce
I found a work around to the problem - posting here in case someone else
runs into the problem

 

I changed the initial select * to separate the attributes and cast them
as real

 

Example: Select cast(LAT2 as real), cast(lon2 as real), cast(confidence
as real), cast(intensity as real), date_time from (

 

I don't know where in the overall package the attributes were converted
to integer but this method at least lets the SQL code work

 

GetField as string does not work in this case but that does not really
surprise me since the resulting data does not come from a table rather
it is processed data.

It just means we have to be very careful of the fieldIndex alignment

 

Bruce



From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Clay, Bruce
Sent: Wednesday, November 04, 2009 12:25 PM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] SQL results truncated

 

It seems like I encountered this problem before but I can not find any
information about it now.

 

If I run a SQ script like the following

 

Select * from

 (Select MIN_LAT - (round((MIN_LAT - LATITUDE) / (MAX_LAT - MIN_LAT) *
1728.497600)) * 0.000579 LAT2,

 MAX_LON - (round((LONGITUDE - MAX_LON) / (MIN_LON - MAX_LON) *
1814.921600)) * 0.000551 LON2,

 Round(sum(TRACK_SIZE) / 1.00) CONFIDENCE,

 max(B_TEMP) Intensity,

 min(TO_CHAR(DATE_TIME, 'MM-DD- HH24:MI:SS')) DATE_TIME 

FROM

   WACDS.MODIS_ACTIVE_FIRE WHERE

  LATITUDE BETWEEN MIN_LAT AND MAX_LAT AND

  LONGITUDE BETWEEN MIN_LON AND MAX_LON AND

  DATE_TIME BETWEEN TO_DATE('03/01/2007 00:00:00' , 'MM-DD-
HH24:MI:SS') AND

TO_DATE('04/30/2007 23:59:59' , 'MM-DD-
HH24:MI:SS') AND

  CONFIDENCE > 1.00

GROUP BY

round((MIN_LAT - LATITUDE) / (MAX_LAT - MIN_LAT) * 1728.497600),

round((LONGITUDE - MAX_LON) / (MIN_LON - MAX_LON) *
1814.921600))

  where 

(CONFIDENCE * 1.00) > 1.00

  ORDER BY DATE_TIME

 

From sqlPal I get LAT2 and LON2 data back as doubles

 

If I run it through OGR ExecuteSql the LAT2 and LON2 data comes back as
integers and can not be used to plot the data

 

OGRFieldDefn *fieldDef = featureDef->GetFieldDefn(fieldIndex);

if (fieldDef != NULL)

{

  fieldType = fieldDef->GetType();

}

 

Returns type integer

 

And both

 

 const char *latStr = (char *)feature->GetFieldAsString("LAT2");

 

  double latitude = feature->GetFieldAsDouble("LAT2");

 

 

return(only the whole portion of what I see in sqlPal.

 

 

Does anyone see / know what might be going wrong?

 

Bruce

 



This message and any enclosures are intended only for the addressee.
Please  
notify the sender by email if you are not the intended recipient.  If
you are  
not the intended recipient, you may not use, copy, disclose, or
distribute this  
message or its contents or enclosures to any other person and any such
actions  
may be unlawful.  Ball reserves the right to monitor and review all
messages  
and enclosures sent to or from this email address.



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] SQL results truncated

2009-11-04 Thread Clay, Bruce
It seems like I encountered this problem before but I can not find any
information about it now.

 

If I run a SQ script like the following

 

Select * from

 (Select MIN_LAT - (round((MIN_LAT - LATITUDE) / (MAX_LAT - MIN_LAT) *
1728.497600)) * 0.000579 LAT2,

 MAX_LON - (round((LONGITUDE - MAX_LON) / (MIN_LON - MAX_LON) *
1814.921600)) * 0.000551 LON2,

 Round(sum(TRACK_SIZE) / 1.00) CONFIDENCE,

 max(B_TEMP) Intensity,

 min(TO_CHAR(DATE_TIME, 'MM-DD- HH24:MI:SS')) DATE_TIME 

FROM

   WACDS.MODIS_ACTIVE_FIRE WHERE

  LATITUDE BETWEEN MIN_LAT AND MAX_LAT AND

  LONGITUDE BETWEEN MIN_LON AND MAX_LON AND

  DATE_TIME BETWEEN TO_DATE('03/01/2007 00:00:00' , 'MM-DD-
HH24:MI:SS') AND

TO_DATE('04/30/2007 23:59:59' , 'MM-DD-
HH24:MI:SS') AND

  CONFIDENCE > 1.00

GROUP BY

round((MIN_LAT - LATITUDE) / (MAX_LAT - MIN_LAT) * 1728.497600),

round((LONGITUDE - MAX_LON) / (MIN_LON - MAX_LON) *
1814.921600))

  where 

(CONFIDENCE * 1.00) > 1.00

  ORDER BY DATE_TIME

 

From sqlPal I get LAT2 and LON2 data back as doubles

 

If I run it through OGR ExecuteSql the LAT2 and LON2 data comes back as
integers and can not be used to plot the data

 

OGRFieldDefn *fieldDef = featureDef->GetFieldDefn(fieldIndex);

if (fieldDef != NULL)

{

  fieldType = fieldDef->GetType();

}

 

Returns type integer

 

And both

 

 const char *latStr = (char *)feature->GetFieldAsString("LAT2");

 

  double latitude = feature->GetFieldAsDouble("LAT2");

 

 

return(only the whole portion of what I see in sqlPal.

 

 

Does anyone see / know what might be going wrong?

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] double delay getting feature count

2009-10-14 Thread Clay, Bruce
Chaitany:

 

Thanks for your reply.

 

  I would expect to get one delay due to the connection time but I did
not expect one for both the GetFeatureCount and the GetNextFeature.
Both of those calls are on the same layer variable.  I originally had
the GetFeatureCount before the ResetReading.  That gave the same delay.
As it turned out the code show below actually had 3 delays.  One for the
GetNextFeature outside the loop, one for the GetFeatureCount and another
one for the first encounter of the GetNextFeature at the bottom of the
loop.  Apparently the GetFeatureCount is leaving the feature pointer at
the bottom of the loop and we have to take time to move back to the top.

 

I would step into the code but I can't get Visual Studio to dig down
into gdal16.dll for some reason even though it was built as a debug
library.

 

 

Bruce



From: Chaitanya kumar CH [mailto:chaitanya...@gmail.com] 
Sent: Wednesday, October 14, 2009 2:34 PM
To: Clay, Bruce
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] double delay getting feature count

 

Bruce,

The GetFeatureCount function gets the value with an SQL query to the
data server. The bottleneck may be at the connection.

On Wed, Oct 14, 2009 at 9:28 PM, Clay, Bruce  wrote:

I have tried several different arrangements trying to get the feature
count from a user selection and I am getting a delay two times for each
query.

 

My current arrangement is

 

OGRLayer *queryLayer = dataSource->ExecuteSQL(fullQueryString, NULL,
"generic");

 

if (queryLayer != NULL)

{

  queryLayer->ResetReading();

  OGRFeature *feature = queryLayer->GetNextFeature();

 

  int numFeatures = queryLayer->GetFeatureCount();

 

. . .Display progress meter then loop reading the features from Oracle

 

 

 

 

I have tried putting the call to GetFeatureCount first and there is no
apparent difference.

 

I am reading data from an Oracle database and using GDAL version 1.6.2
on Windows XP

 

The call to ExecuteSql returns right away but the call to the first
GetNextFeature and the call to GetFeatureCount both have a long delay
depending on the size of the dataset.

 

I need the feature count to use in a progress popup window to let the
user know what is happening.

 

Is there a way to only pay for the query time once and still get the
feature count?

 

 

Bruce

This message and any enclosures are intended only for the addressee.
Please  
notify the sender by email if you are not the intended recipient.  If
you are  
not the intended recipient, you may not use, copy, disclose, or
distribute this  
message or its contents or enclosures to any other person and any such
actions  
may be unlawful.  Ball reserves the right to monitor and review all
messages  
and enclosures sent to or from this email address.


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




-- 
Best regards,
Chaitanya kumar CH.




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] double delay getting feature count

2009-10-14 Thread Clay, Bruce
I have tried several different arrangements trying to get the feature
count from a user selection and I am getting a delay two times for each
query.

 

My current arrangement is

 

OGRLayer *queryLayer = dataSource->ExecuteSQL(fullQueryString, NULL,
"generic");

 

if (queryLayer != NULL)

{

  queryLayer->ResetReading();

  OGRFeature *feature = queryLayer->GetNextFeature();

 

  int numFeatures = queryLayer->GetFeatureCount();

 

. . .Display progress meter then loop reading the features from Oracle

 

 

 

 

I have tried putting the call to GetFeatureCount first and there is no
apparent difference.

 

I am reading data from an Oracle database and using GDAL version 1.6.2
on Windows XP

 

The call to ExecuteSql returns right away but the call to the first
GetNextFeature and the call to GetFeatureCount both have a long delay
depending on the size of the dataset.

 

I need the feature count to use in a progress popup window to let the
user know what is happening.

 

Is there a way to only pay for the query time once and still get the
feature count?

 

 

Bruce




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] GDAL/ArcObjects based app crashes with newer GDAL versions (was How to delete shapefile)

2009-06-17 Thread Clay, Bruce
Mateusz:

Yes that is the case.  The same application works fine with GDAL 1.5.4
but not with any newer version.

I am beginning to suspect SDE / GDAL interaction.  I think SDE uses GDAL
1.4.  My GDAL library is built with SDE support and I am linking in
ArcObjects libraries to my application.  I am linking to the GDAL static
library when the crash occurs.  If I try to link to the gdal_i.lib then
the program does not crash but it does not let me step into any of the
methods even though it is a debug library and no GDAL functions work.

You mentioned "configuration".  Does GDAL 1.6 and new code require some
configuration on Windows XP that was not required before?

Bruce


-Original Message-
From: Mateusz Loskot [mailto:mate...@loskot.net] 
Sent: Wednesday, June 17, 2009 1:15 PM
To: Clay, Bruce
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] How to delete shapefile

Clay, Bruce wrote:
> Mateusz:
>   Thanks for your reply.  Unfortunately I can not get far enough to do
> that.  The crash is occurring down stream from OGRRegisterAll.  That
is
> to say, the last call in my code space before the crash is
> OGRRegisterAll. I can not get OGR initialized to be able to open a
data
> source.

Bruce,

Are you saying that you are unable to run this simple program
successfully?

#include "ogrsf_frmts.h"
int main()
{
 OGRRegisterAll();
}

If you indeed can not run it, it probably means your GDAL installation
is not configured properly or broken.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


RE: [gdal-dev] How to delete shapefile

2009-06-17 Thread Clay, Bruce
   mfc80d.dll!CWnd::SendMessageToDescendants(HWND__ * hWnd=0x00921336, 
unsigned int message=868, unsigned int wParam=0, long lParam=0, int bDeep=1, 
int bOnlyPerm=1)  Line 2524C++
mfc80d.dll!CWnd::SendMessageToDescendants(unsigned int message=868, 
unsigned int wParam=0, long lParam=0, int bDeep=1, int bOnlyPerm=1)  Line 170 + 
0x20 bytes  C++
mfc80d.dll!CFrameWnd::InitialUpdateFrame(CDocument * pDoc=0x003b90b0, 
int bMakeVisible=1)  Line 750 C++
mfc80d.dll!CDocTemplate::InitialUpdateFrame(CFrameWnd * 
pFrame=0x003b9140, CDocument * pDoc=0x003b90b0, int bMakeVisible=1)  Line 330   
C++
mfc80d.dll!CSingleDocTemplate::OpenDocumentFile(const char * 
lpszPathName=0x, int bMakeVisible=1)  Line 200 C++
mfc80d.dll!CDocManager::OnFileNew()  Line 848   C++
mfc80d.dll!CWinApp::OnFileNew()  Line 22C++
mfc80d.dll!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x011a57c8, unsigned 
int nID=57600, int nCode=0, void (void)* pfn=0x0079e936, void * 
pExtra=0x, unsigned int nSig=56, AFX_CMDHANDLERINFO * 
pHandlerInfo=0x)  Line 82 C++
mfc80d.dll!CCmdTarget::OnCmdMsg(unsigned int nID=57600, int nCode=0, 
void * pExtra=0x, AFX_CMDHANDLERINFO * pHandlerInfo=0x)  Line 
381 + 0x27 bytes C++
mfc80d.dll!CWinApp::ProcessShellCommand(CCommandLineInfo & 
rCmdInfo={...})  Line 24 + 0x20 bytesC++
OccurrenceTool.exe!COccurrenceToolApp::InitInstance()  Line 93 + 0xc 
bytes  C++
mfc80d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x0040, HINSTANCE__ * 
hPrevInstance=0x, char * lpCmdLine=0x00151f39, int nCmdShow=1)  Line 37 
+ 0xd bytes C++
OccurrenceTool.exe!WinMain(HINSTANCE__ * hInstance=0x0040, 
HINSTANCE__ * hPrevInstance=0x, char * lpCmdLine=0x00151f39, int 
nCmdShow=1)  Line 33C++
OccurrenceTool.exe!__tmainCRTStartup()  Line 589 + 0x35 bytes   C
OccurrenceTool.exe!WinMainCRTStartup()  Line 414    C
    kernel32.dll!7c817067() 
[Frames below may be incorrect and/or missing, no symbols loaded for 
kernel32.dll]  

-Original Message-
From: Frank Warmerdam [mailto:warmer...@pobox.com] 
Sent: Tuesday, June 16, 2009 7:31 PM
To: Clay, Bruce
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] How to delete shapefile

Clay, Bruce wrote:
> I am trying to delete a temporary shapefile after running a process with 
> the following code.
...
> The TestCapability always returns FALSE.  If I call DeleteLayer anyway I 
> get an unsupported operation error messege.
> 
> I am using GDAL 1.5.3 with Visual Studio 2005.
>
> Is there an error in my code or a different way to delete a shapefile 
> using GDAL or do I have to go to the operating system and find all of 
> the files that make up the shapefile and delete them that way?

Bruce,

It looks like the DeleteLayer support for the shapefile driver was added
for 1.6.0.  So you need to either upgrade or perhaps just delete the files
yourself with unlink().  Make sure the datasource is closed when you do so.

Best regards,
-- 
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] How to delete shapefile

2009-06-16 Thread Clay, Bruce
I am trying to delete a temporary shapefile after running a process with
the following code.

 

int GdalWrapper::DeleteDataset(const char *datasetName)

{

  int status = -1;

 

  if (datasetName != NULL)

  {

OGRDataSource *dataSrc = OpenDatasetFile(datasetName);

if (dataSrc != NULL)

{

  try

  {

int refCnt = dataSrc->GetSummaryRefCount();

if (refCnt > 0)

{

  dataSrc->Release();

}

int deleteOk =
dataSrc->TestCapability(ODsCDeleteLayer);

if (deleteOk == TRUE)

{

  dataSrc->DeleteLayer(0);

  status = 0;

}

else

{

  mLastErrorMsg = "Can not delete requested
dataset";

}

  }

  catch(...)

  {

mLastErrorMsg = "Could not delete layer: ";

mLastErrorMsg += datasetName;

  }

 

}

 

  }

 

  return(status);

}

 

The TestCapability always returns FALSE.  If I call DeleteLayer anyway I
get an unsupported operation error messege.

I am using GDAL 1.5.3 with Visual Studio 2005.

 

Is there an error in my code or a different way to delete a shapefile
using GDAL or do I have to go to the operating system and find all of
the files that make up the shapefile and delete them that way?

 

Bruce

 

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] libLas

2009-05-27 Thread Clay, Bruce
Are there any plans to fold libLas into the GDAL development tree?  In
it's current offshoot it takes quite a bit of manipulation due to the
dependencies.  I even had one link error for stlPort for a dependency.
I did manage to get liblas.lib but Visual Studio complained a bunch
about duplicate declarations.

 

I tried to build using the gdal-1.6.1 source tree but geo_simpletags.h
is not in that path so used libgeotiff-1.2.5 which requires libTiff,
jpeg-6b etc

 

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] HDF5 link problem

2009-05-19 Thread Clay, Bruce
I downloaded the latest version of HDF5 from
ftp://ftp.hdfgroup.org/HDF5/current/bin/windows/ and am trying to build
HDF5 support into GDAL 1.6.1.

Unfortuneately when I enable HDF5 suuport in the nmake.opt I get
unresolved link errors the interesting thing is that the errors are not
just for HDF5.  I do have SDE enabled and GRIB is enabled by default.  I
don't know that the first unresolved is but all of the error go away if
I take HDF5 out of the build.

 

   Creating library gdal_i.lib and object gdal_i.exp

gdalallregister.obj : error LNK2019: unresolved external symbol
_GDALRegister_GEOR referenced in function _gdalallregis...@0

gdalallregister.obj : error LNK2019: unresolved external symbol
_GDALRegister_HDF5Image referenced in function _gdalallregis...@0

gdalallregister.obj : error LNK2019: unresolved external symbol
_GDALRegister_HDF5 referenced in function _gdalallregis...@0

gdalallregister.obj : error LNK2019: unresolved external symbol
_GDALRegister_SDE referenced in function _gdalallregis...@0

gdalallregister.obj : error LNK2019: unresolved external symbol
_GDALRegister_GRIB referenced in function _gdalallregis...@0

gdal16.dll : fatal error LNK1120: 5 unresolved externals

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\link.EXE"' : return code '0x460'

Stop.

 

Has anyone seen this behavior and/or have a solution?

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] GDAL / libKml interaction causes app to crash

2009-04-02 Thread Clay, Bruce
This question is most likely a problem with libkml.  I did post a
message on the libkml forum as well.  My apologies if you are subscribed
to both asnd getting this message twice.

 

I am working on an application that uses GDAL and libKml.  Everything
was going fine until I added KmzFile::CreateFromKmlFilepath to create a
kmz file.  The application crashes in GDAL space during start up while
registering the plugins.  The only common link I can find is both
applications are using zlib and minizip.  I downloaded the latest
version of zlib which appears to be the same one currently used by
libkml as well as GDAL. Even though I use  zlibstat.lib in my
application I still get 15 unresolved externals.  In the original setup
I linked in minizip.lib but minizip is only created as an executable in
the current version.  Some of the unresolved externals are shohw at the
end of this message.

 

Is there a known work around to this problem?

 

 

Error 19 error LNK2019: unresolved external symbol _zipClose
referenced in function "public: __thiscall
kmlengine::ZlibImpl::~ZlibImpl(void)" (??1zlibi...@kmlengine@@q...@xz)
libkmlengine.lib  

Error 20 error LNK2019: unresolved external symbol _unzClose
referenced in function "public: __thiscall
kmlengine::ZlibImpl::~ZlibImpl(void)" (??1zlibi...@kmlengine@@q...@xz)
libkmlengine.lib  

Error 21 error LNK2019: unresolved external symbol
_unzGoToFirstFile referenced in function "public: static class
kmlengine::KmzFile * __cdecl kmlengine::KmzFile::OpenFromString(class
std::basic_string,class
std::allocator > const &)"
(?openfromstr...@kmzfile@kmlengine@@sapa...@abv?$basic_string@DU?$char_t
ra...@d@std@@v?$alloca...@d@2@@std@@@Z) libkmlengine.lib  

 

Bruce

 

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] in memory KML

2009-04-01 Thread Clay, Bruce

LibKml can do the in memory file and a lot of other things but the 
documentation / examples are rather thin.  There is documentation that tells 
you what the parameters of a call are supposed to be but not to tell you when 
to use a given method.  They have several test apps but for the most part they 
only test a single class at a time.  

For example, I am trying to set the attributes in a kml message.  The leverage 
expat to do a lot of the xml stuff and the attributes seem to relate directly 
to the expat attributes and not to the way they are used when OGR creates a KML 
file.

There are very few examples shown when I Google on the web for examples.

All in all it looks quite capable but it takes a bit of digging to find out how 
to do things.

Then there is the licenses issue.  I can use it in my app without problems but 
using it in an open source GDAL plug-in may be an issue.

Bruce

-Original Message-
From: gdal-dev-boun...@lists.osgeo.org 
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Mano Marks
Sent: Wednesday, April 01, 2009 3:13 PM
To: Mateusz Loskot
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] in memory KML

Seems like libkml would be a good candidate for handling KML in memory.

On Wed, Apr 1, 2009 at 3:23 AM, Mateusz Loskot  wrote:
> Frank Warmerdam wrote:
>>
>> Clay, Bruce wrote:
>>>
>>> After a bit more digging I am not sure I asked the right question.
>>>
>>>
>>> What I want to do is read feature information from a shapefile or other
>>> data source and get a string that contains the feature information encoded
>>> in KML that I can pass directly into Google Earth.  I know I can do this
>>> operation is I open the shapefile write the KML data to disk then open the
>>> kml file up with fopen then read it into memory and send it t Google Earth
>>> but I would like to save the disk write the read operation.
>>>
>>>
>>> Any thoughts?
>>
>> Bruce,
>>
>> I've skimmed the KML driver and there is no sign that it uses the VSI*L
>> API for file access, so I don't see any way you can write results to a
>> memory buffer without substantial recoding in the kml driver.
>
>
> Looks like a candidate for proposal for the GSoC 2009
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Mano Marks
Geo Developer Advocate
http://twitter.com/ManoMarks
Join me for Google I/O, Google's biggest Developer Conference, in San
Francisco, May 27th and 28th, 2009
http://code.google.com/events/io/
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


RE: [gdal-dev] in memory KML

2009-03-31 Thread Clay, Bruce
After a bit more digging I am not sure I asked the right question.

 

What I want to do is read feature information from a shapefile or other
data source and get a string that contains the feature information
encoded in KML that I can pass directly into Google Earth.  I know I can
do this operation is I open the shapefile write the KML data to disk
then open the kml file up with fopen then read it into memory and send
it t Google Earth but I would like to save the disk write the read
operation.

 

Any thoughts?

 

Bruce

 



From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Clay, Bruce
Sent: Tuesday, March 31, 2009 12:53 PM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] in memory KML

 

I know that OGR supports in memory feature classes and it supports
creating KML data.  

 

I could not find any examples of using the in-memory datasource.

 

Is there a way to create KML in memory? 

 

Bruce

 



This message and any enclosures are intended only for the addressee.
Please  
notify the sender by email if you are not the intended recipient.  If
you are  
not the intended recipient, you may not use, copy, disclose, or
distribute this  
message or its contents or enclosures to any other person and any such
actions  
may be unlawful.  Ball reserves the right to monitor and review all
messages  
and enclosures sent to or from this email address.



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] in memory KML

2009-03-31 Thread Clay, Bruce
I know that OGR supports in memory feature classes and it supports
creating KML data.  

 

I could not find any examples of using the in-memory datasource.

 

Is there a way to create KML in memory? 

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

FW: [gdal-dev] OGR - Oracle problem

2009-03-09 Thread Clay, Bruce
Follow up

 

I am not sure which is a better solution speed wise but I did find 2
solutions to the problem I was having - 

 

 

The first solution that appears to work is to cast the returned distance
field to a real in the outer select statement

 

select OBJECTID, cast(Dist as real) from

(select OBJECTID, sdo_nn_distance(1) Dist from

GEONAMES_SDO a1 where DSG LIKE 'PPL%' AND

sdo_nn(a1.shape, 

sdo_geometry(2001, null,

sdo_point_type((-84.4850,-21.9810,
NULL), null, null),

'sdo_num_res=100',1) = 'TRUE') where

  Dist <= 0.09633643;

 

The second approach that appeared to work id from as code perspective is
to set the field type after the Execute SQL.  I am not sure how stable
this method is because the firt time I tried it after the first
GetNextFeature it did not work on the first feature but did work on the
rest.  I guess that indicates that the change has to be performed before
requesting the feature not before requesting the attribute.

 

OGRLayer *queryLayer = outputDataSrc->ExecuteSQL(sqlquery,
NULL, "generic");

 

if (queryLayer != NULL)

{

  OGRFeatureDefn *featureDef =
queryLayer->GetLayerDefn();

  if (featureDef != NULL)

  {

 

OGRFieldDefn *fieldDef =
featureDef->GetFieldDefn(1);

 

if (fieldDef != NULL)

{

  fieldDef->SetType(OFTReal);

}

 

queryLayer->ResetReading();

 

OGRFeature *feature =
queryLayer->GetNextFeature();

while (feature != NULL)

{

 

 

Bruce

 



From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Clay, Bruce
Sent: Friday, March 06, 2009 3:52 PM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] OGR - Oracle problem

 

 

When I issue the following SQL query through SqlPal I get 2 columns of
what appears to be valid data

 

select * from

 (select OBJECTID, sdo_nn_distance(1) Dist from

GEONAMES_SDO a1 where DSG LIKE 'PPL%' AND sdo_nn(a1.shape,

sdo_geometry(2001, null, sdo_point_type(-84.4850,-21.9810,
NULL), null, null),

'sdo_num_res=100',1) = 'TRUE');

 

Results

 

OBJECTID Dist

451323  .397194968358102

432828  .647925639080596

447967  .239182235498376

453566  .495207228227733

454057  .270980772175814

392983  .165016165538413

407235  .325487083888139

408026  .647925639080596

399747  .647925639080596

399036  .325487083888139

409567  .165016165538413

423135  .239182235498376

 

If I issue the same query through OGR ExecuteSql I get the first column
(OBJECTID) as it appears in SqlPal but the second column which should be
the distance comes back as type OFTInteger and the value is always zero
reguardless of where I call GetFieldAsString or GetFieldAsDouble.

 

Is there something else that has to be specified to get the correct data
type on this type of a query where a column is created dynamically?

 

Bruce

 

 

 



This message and any enclosures are intended only for the addressee.
Please  
notify the sender by email if you are not the intended recipient.  If
you are  
not the intended recipient, you may not use, copy, disclose, or
distribute this  
message or its contents or enclosures to any other person and any such
actions  
may be unlawful.  Ball reserves the right to monitor and review all
messages  
and enclosures sent to or from this email address.



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] OGR - Oracle problem

2009-03-06 Thread Clay, Bruce
 

When I issue the following SQL query through SqlPal I get 2 columns of
what appears to be valid data

 

select * from

 (select OBJECTID, sdo_nn_distance(1) Dist from

GEONAMES_SDO a1 where DSG LIKE 'PPL%' AND sdo_nn(a1.shape,

sdo_geometry(2001, null, sdo_point_type(-84.4850,-21.9810,
NULL), null, null),

'sdo_num_res=100',1) = 'TRUE');

 

Results

 

OBJECTID Dist

451323  .397194968358102

432828  .647925639080596

447967  .239182235498376

453566  .495207228227733

454057  .270980772175814

392983  .165016165538413

407235  .325487083888139

408026  .647925639080596

399747  .647925639080596

399036  .325487083888139

409567  .165016165538413

423135  .239182235498376

 

If I issue the same query through OGR ExecuteSql I get the first column
(OBJECTID) as it appears in SqlPal but the second column which should be
the distance comes back as type OFTInteger and the value is always zero
reguardless of where I call GetFieldAsString or GetFieldAsDouble.

 

Is there something else that has to be specified to get the correct data
type on this type of a query where a column is created dynamically?

 

Bruce

 

 

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Get pixel value by lat and long

2009-01-12 Thread Clay, Bruce
I have searched the web and not found any methods to call so I thought I
would check before writing one.

 

I need to get the pixel value of a land use raster based on a user
selected latitude and longitude.

I know I can get the spatial reference of raster and the pixel size to
calculate the right band but this seems like a function that would
already be some level of the library already.

 

Is there a method that I missed somewhere?

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] Debugging on Windows Using Visual Studio

2008-12-19 Thread Clay, Bruce
Joel:

Is this in C# or C++?  Which version of the compiler?

Bruce

-Original Message-
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Joel Odom
Sent: Friday, December 19, 2008 10:47 AM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] Debugging on Windows Using Visual Studio

Has anyone had any experience troubleshooting debugging issues with
Visual Studio?  I can't step in to any GDAL methods from my project,
even though I have debug symbols in the .dll and a debug database file
(.pdb).  Any experiences working this out would be appreciated.
Thanks.


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



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


RE: [gdal-dev] GDAL 1.6.0 DLL Hell problem on Windows Vista?

2008-12-16 Thread Clay, Bruce
Frank:
  Part of the problem seems to be in the debug version of GEOS.  I don't
know exactly where at this point.

When I use the geos_c.dll you posted ogrinfo works ok.  If I make a
release version of GEOS then it works but if I make a debug version I
get the error message.  I don't need the debug version of GEOS at this
point so I will continue with the release version.

That takes care of the C++ issues but the C# programs don't work on the
64 bit Vista system.  Everything works fine on our older systems running
XP

Thanks for your help

Bruce

-Original Message-
From: Frank Warmerdam [mailto:warmer...@pobox.com] 
Sent: Tuesday, December 16, 2008 4:41 PM
To: Clay, Bruce
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] GDAL 1.6.0 DLL Hell problem on Windows Vista?

Clay, Bruce wrote:
> Frank:
>   I am trying to run ogrinfo from the GDAL build app directory.  I did
> not have a problem with this until my computer died and I had to get a
> new one with you guessed it Vista.  It is a 64 bit system running 64
bit

> Vista so that may be part of the problem.  
> 
> Did you build with the manifest as part of the build process or just
add
> it to the runtime directory?

Bruce,

The Microsoft.VC90.CRS.manifest is part of the runtime, and I copy it
from
the runtime directory (as well as the runtime DLLs).

The GDAL16.DLL and executables also all have manifests generated
automatically
by VC, and the makefiles have an explicit step to embed the manifests
into
the DLL and executables using the "mt" command.

eg.

ogrinfo.exe:ogrinfo.cpp $(GDALLIB) $(XTRAOBJ)
$(CC) $(CFLAGS) $(XTRAFLAGS) ogrinfo.cpp $(XTRAOBJ) $(LIBS) \
/link $(LINKER_FLAGS)
if exist $...@.manifest mt -manifest $...@.manifest
-outputresource:$@;1


> Did you build the whole package with VS 2008 nor just the GEOS
portion?

Only GEOS was built with VS2008.  The rest was built with VS2003.

> I have run into other problems on this computer mainly with drivers.
My
> Microsoft finger print reader is not supported on 64 bit.  It makes me
> wonder just what MS is thing some times, actually most of the time.
> They keep changing things that don't help at all.

I am sure they have good reasons for the things they do, but MS
improvements often just feel like churn to me.  All this manifest stuff
has certainly been a big hassle, breaking a reasonably understandable
model of how DLLs work.

Best regards,
-- 
---+
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


RE: [gdal-dev] GDAL 1.6.0 DLL Hell problem on Windows Vista?

2008-12-16 Thread Clay, Bruce
Frank:
  I am trying to run ogrinfo from the GDAL build app directory.  I did
not have a problem with this until my computer died and I had to get a
new one with you guessed it Vista.  It is a 64 bit system running 64 bit
Vista so that may be part of the problem.  

Did you build with the manifest as part of the build process or just add
it to the runtime directory?

Did you build the whole package with VS 2008 nor just the GEOS portion?

I have run into other problems on this computer mainly with drivers.  My
Microsoft finger print reader is not supported on 64 bit.  It makes me
wonder just what MS is thing some times, actually most of the time.
They keep changing things that don't help at all.

-Original Message-
From: Frank Warmerdam [mailto:warmer...@pobox.com] 
Sent: Tuesday, December 16, 2008 3:13 PM
To: Clay, Bruce
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] GDAL 1.6.0 DLL Hell problem on Windows Vista?

Clay, Bruce wrote:
> Frank:
>   What is the secret to getting GDAL to build this way?  I have Visual
> Studio 2005 and have not been able to get it to run.  The zip file you
> posted works fine on my system (Vista 64 Bit) but it does not include
> the csharp files so I have to build.
> 
> I have tried building with the makefile.vc file and with the solution
> file.
> In both cases it compiles fine but won't run.  I get an error popup
when
> I try to run ogrinfo that says
> 
>  "An application has made an attempt to load the C runtime library
> without using a manifest.  This is an unsupported way to load Visual
> Studio C++ libraries" etc.

Bruce,

I'm not sure what issue(s) you are running into exactly.  Is this just
running something like gdalinfo that you build against the GDAL16.DLL
that you built?

The only "special" thing I do for the GEOS part of the build which I
build with visual studio 9 (aka 2008 express I think) was to ensure
I distributed the msvcp90.dll and msvcr90.dll along with the
corresponding
Microsoft.VC90.CRS.manifest.

I think that Visual Studio 2005 is VC8, so there should be a
corresponding
msvc{r,p}80.dll you would need with it, and perhaps a corresponding
manifest.  I haven't been using VS2005 much though so I'm not so sure.

These issues (needing a manifest) don't exist with older visual studio
versions.

Best regards,
-- 
---+
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


RE: [gdal-dev] GDAL 1.6.0 DLL Hell problem on Windows Vista?

2008-12-16 Thread Clay, Bruce

Frank:
  What is the secret to getting GDAL to build this way?  I have Visual
Studio 2005 and have not been able to get it to run.  The zip file you
posted works fine on my system (Vista 64 Bit) but it does not include
the csharp files so I have to build.

I have tried building with the makefile.vc file and with the solution
file.
In both cases it compiles fine but won't run.  I get an error popup when
I try to run ogrinfo that says

 "An application has made an attempt to load the C runtime library
without using a manifest.  This is an unsupported way to load Visual
Studio C++ libraries" etc.


Bruce


-Original Message-
From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Frank Warmerdam
Sent: Monday, December 15, 2008 7:42 PM
To: Jason Roberts
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] GDAL 1.6.0 DLL Hell problem on Windows Vista?

Jason Roberts wrote:
> Phil,
> 
> Thanks for the suggestion. I suspect it will work. My XP SP3 machine
has
> VC90 entries in C:\Windows\WinSxS, while my Vista SP1 machine does
not.
> 
> But if GDAL requires the user to install the VC++ redistributable
first, why
> is GDAL redisting the DLLs (e.g. msvcr90.dll) in the GDAL\bin
directory? I
> suspect the intent was to override sxs in the build process, or
specify a
> publisher policy, or something, so that the user does not have to
install
> the redistributable themselves. The idea being that GDAL would work
like
> old-school, pre-sxs applications, where you just have to have the
right DLL
> versions in the same directory as your .exe.
> 
> Was that not the intent? Are users indeed expected to install that
> redistributable first?

Jason,

My fault.  The package includes the required VC9 DLLs, but I neglected
to include the manifest for them (Microsoft.VC90.CRT.manifest).  I
have repackaged the kit with that manifest, and I'd appreciate your
testing
it.

   http://download.osgeo.org/gdal/win32/1.6/gdalwin32exe160.zip

Best regards,
-- 
---+
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] probelms with 1.6.0 on Vista 64 bit

2008-12-08 Thread Clay, Bruce
I am having problems getting GDAL 1.6.0 to work on Vista 64 bit.  It
fails on OgrRegisterAll.  It dose not through an exception it just lets
the program return to the GUI without any error message.  I put a break
point in the error handler call back and it does not hit that either.

 

It appears to be related to zlib.  I don't have the exact line number
but I was wondering if anyone else has been able to get GDAL 1.6.0 up on
a Vista 64 bit system.

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] KML problem

2008-11-07 Thread Clay, Bruce
I am using OGR to create both a shapefile and a KML file.  The data in
the shapefile looks good and the values in the KML are the same as in
the shapefile but they are shifted up by 2 places.  There are 2 extra
attributes in the KML file (Name and Description). My "Longitude" value
appears in the "Description" field.

 

I tried to use CSLSetNameValue( ogrOptions, "DescriptionField", "None");
to eliminate the Description field but it did not work.

 

Is there any way to eliminate the Name and Description fields since I
don't have any values to set for them?

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Is GDAL reentrant

2008-11-07 Thread Clay, Bruce
I have a Microsoft application with multiple tabs / property pages.
Each tab is controlled by a separate class.  I have a separate instance
of GDAL in each class.  I also had an instance in a popup that I used to
connect to the database.  After the user logins and the popup window
goes away it seems that I have to reregister the OGR drivers in the tabs
as if the OGRCleanupAll in the destructor of the popup was being applied
to the instances in the tabs as well.

 

Is GDAL / OGR reentrant?  Can we have multiple instances that act
independently?

 

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] Build OGR with ESRI SDE

2008-10-23 Thread Clay, Bruce
Steve:
  One word of caution is to make sure you build all of the supporting
modules (expat, xerces, geos etc) in the same mode.  I spent
considerable time over that past week chasing bizarre crashes that gave
heap errors and other crashes down in Microsoft space only to find that
one of the lower level modules pulled in msvcp80.dll (or something
similar and the other modules pulled in the debug version of the same
file.  

I don't know how ESRI gets GDAL.dll to run on all systems unless they
include files from the c++ redistribution patch in their installation
because in addition to the above headaches I also have to apply a
Microsoft patch to the computers to get even the most basic GDAL program
(like gdalinfo) to run.  It will run where the compiler is but when you
are ready to distribute the program it must be built in release mode and
the patch must go on.

If you also intend to create a c# application to work with ESRI code
make sure your OGR c# code is built with the same execution mode.  Other
than a few headaches like the above you can merge GDAL and ArcObjects
together to get visualization and speed.  Let the GDAL/OGR code do the
heavy lifting and the ArcObjects code do the rest.

Ok, so it was a bit more than one word of caution.

Bruce


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mullins, Steven
Sent: Thursday, October 23, 2008 10:42 AM
To: gdal-dev@lists.osgeo.org
Subject: RE: [gdal-dev] Build OGR with ESRI SDE

Thanks everyone for the pointers.  I assume the Linux version compiles
with GCC.  From what I read, Visual Studio is needed for a win32
compile, which I do not have.  Any chance I could do this with GCC in
win32? 

Thanks again,

Steve

-Original Message-
From: Frank Warmerdam [mailto:[EMAIL PROTECTED]
Sent: Thu, October 23, 2008 10:20 AM
To: Mullins, Steven
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] Build OGR with ESRI SDE


Mullins, Steven wrote:
> I am interested in using OGR to read data from an ArcSDE (9.2-9.3)
database.
> The manual page at http://www.gdal.org/ogr/drv_sde.html indicates that
GDAL
> must be compiled "with the ESRI provided ArcSDE client libraries".
> 
> Before I sink a lot a time into this, can anyone share their
experience
> compiling OGR with ESRI libraries for SDE?  What specific steps need
to be
> taken to accomplish this?

Steve,

On linux this boils down to setting one or both of:

   --with-sde=DIRInclude ESRI SDE support (DIR is SDE's install
dir).
   --with-sde-version=VERSION NUMBER  Set ESRI SDE version number
(Default is 80)

when configuring.  On Windows setting of:

#SDE_ENABLED = YES
#SDE_VERSION=91
#SDE_PLUGIN = NO
#SDE_SDK = C:\arcgis\arcsde
#SDE_INC = $(SDE_SDK)\include
#SDE_LIB = $(SDE_SDK)\lib\pe$(SDE_VERSION).lib \
#  $(SDE_SDK)\lib\sde$(SDE_VERSION).lib 
$(SDE_SDK)\lib\sg$(SDE_VERSION).lib

in gdal/nmake.opt


I'd appreciate someone setting up a topic on SDE under:

   http://trac.osgeo.org/gdal/wiki/BuildHints

if interesting information is collected.

Best regards,
-- 
---+
--
I set the clouds in motion - turn up   | Frank Warmerdam,
[EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Release version of program crashes

2008-10-10 Thread Clay, Bruce
I have a GDAL / OGR based program that runs fine in debug mode on
Windows XP compiles with Visual Studio 2005 but when I try to run in
Release mode the program crashes.

Information is hard to get in release modes as you know so the details I
can provide are sketchy but I am hoping someone has seen a similar
problem and knows what is happening.

I put a break point in my GDAL error handler and indeed the code is
entering the handler.  It seems to crash every time after it hits the
error handler.  It does not appear to be triggering an exception because
it never hits the break point in my catch block.

The things that are getting triggered as errors are minor things like a
shapefile does not exist when I try to delete it just to make sure it
does not exist.  Another one is CreateField throws a message because
DateTime fields are invalid in shapefiles so a Date Field is created
instead.

I though I saw something on the net once that we have to do to get OGR
to throw and exception but I can not find it now.

Any thoughts would be greatly appreciated

Bruce




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] KML output fields

2008-09-26 Thread Clay, Bruce
When I use ogr2ogr to convert a shapefile to KML there are no "Name" or
"Description" fields in the output and all attributes are lined up.

 

When I try to create a KML file from my code and populate the data both
"Name" and "Description" fields are included in the output.

 

I have tried not a variety of things in the call to KML's
CreateDataSource

Not setting any options (i.e. passing a NULL)

Setting both to empty strings

CSLSetNameValue( ogrOptions, "NameField", "");

CSLSetNameValue( ogrOptions, "DescriptionField", "");

 

  Setting both to "None"

CSLSetNameValue( ogrOptions, "NameField", "None");

CSLSetNameValue( ogrOptions, "DescriptionField", "None");

 

 

None of the above will remove the 2 fields from the output KML as a
result all real attribute values are sifted up 2 places.  

 

I looked in the ogr2ogr.cpp and I do not see any parameters getting
passed into the call.

 

Does anyone have any idea what might be causing this?

 

Bruce

 

 

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] shapefile field size

2008-09-24 Thread Clay, Bruce
Follow on to earlier message.

 

I removed the SetLength and SetPrecision from the field specification
and things are working now.  ArcMap thinks the integer fields are
Doubles with length of 11 and precision of 11 but the values do not
appear to be truncated so that is a good thing

 

It just seems odd that the OCI driver accepted the size but the
shapefile driver did not.

 

Bruce

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Clay, Bruce
Sent: Wednesday, September 24, 2008 2:55 PM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] shapefile field size

 

I have an OGR based application that I am having problems with data
storage

 

Several fields are OFTInteger and several are OFTReal

 

When I write a dataset using the OCI driver the integer fields all store
valid information.

 

When I write a dataset using the Shapefile driver the integer fields
appear to be truncated to shorts. They are defined with a field width of
4 bytes.  It almost looks like the data is stored as ASCII because only
the 4 most significant digits are actually saved in the shapefile.

 

Is this the intended operation or is there some extra flag that I need
to set when I switch between creating an Oracle table and a shapefile?

 

Bruce

 



This message and any enclosures are intended only for the addressee.
Please  
notify the sender by email if you are not the intended recipient.  If
you are  
not the intended recipient, you may not use, copy, disclose, or
distribute this  
message or its contents or enclosures to any other person and any such
actions  
may be unlawful.  Ball reserves the right to monitor and review all
messages  
and enclosures sent to or from this email address.



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] shapefile field size

2008-09-24 Thread Clay, Bruce
I have an OGR based application that I am having problems with data
storage

 

Several fields are OFTInteger and several are OFTReal

 

When I write a dataset using the OCI driver the integer fields all store
valid information.

 

When I write a dataset using the Shapefile driver the integer fields
appear to be truncated to shorts. They are defined with a field width of
4 bytes.  It almost looks like the data is stored as ASCII because only
the 4 most significant digits are actually saved in the shapefile.

 

Is this the intended operation or is there some extra flag that I need
to set when I switch between creating an Oracle table and a shapefile?

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] negative buffer

2008-09-09 Thread Clay, Bruce
I am trying to use GDAL to cluster a group of points.  I am creating a
buffer around the points then testing buffered points for intersection.
I am putting those that intersect into a GeometryCollection then
creating a convexHull to smooth the polygon.

 

All of that works ok but the problem is that the resultant polygon is
larger than is desired because of the buffer used to create the
intersections.

 

I tried to use a negative value with the Geometry Buffer method to
shrink the polygon back down to the proper size but Buffer always
returns a NULL pointer.  I stepped down into the call and it looks like
GEOS is returning a valid geometry but OGR rejects the polygon do to the
number of points being too low.  The initial buffer size is 1.5 Km so
smallest cluster has a minimum spatial diameter of 3 km.  I saw point
counts in the debugger of over 2000 so I am not sure why OGR appears to
reject the geometry that GEOS passed back.  I don't have GEOS compiled
with debug turned on so I could not step into that

 

Is there another way to reduce the size of a polygon or a smarter war to
cluster points?

 

Bruce

 

 

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] OCI driver not adding data to Oracle Table

2008-09-03 Thread Clay, Bruce
I have been trying to use the OCI driver to create a table and load data
into it.  I have been using the same code loop in the past to create
shapefiles without problems.  No errors are reported during the
CreateFeature and SetField process based on return status but no data
shows up in the table.

 

I added several calls to CPLGetLastErrorMsg and still do not get any
reported errors.  I set a trap in OGROCITableLayer and walked down that
path into FinalizeNewLayer and FlushPendingFeatures and finally got an
error message pn the OCIStmtExecute call indicating that a "value was
larger than specified precision allows for this column".  Unfortuneatly
it did not indicate which column was in error.

 

Is there any way to pin down the exact column?

 

If did notice in the SetField that atof(string) returned more digits to
the right of the decimal point than the precision specified.  Is that
the likely cause of the problem?  The source data only has 8 characters
to the right of the decimal point but the atof call returns more than 8
when it converts the string retrieved from the source table in Oracle.

 

Any thoughts would be greatly appreciated.

 

Bruce




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

RE: [gdal-dev] GetExtent method

2008-09-02 Thread Clay, Bruce
Frank:
  As best I can tell the data layer is recognized as an OGROCITableLayer
but the call to GetExtent only goes down to the OGRLayer.  It is not
passed down to the specific (OCI) driver.  The calls to ResetReading and
GetNextFeature in the GetExtent method are passed to the OCI driver but
the GetGeometryRef and GetEvelope are not.  The process flows into the
"if (poGeom && !bExtentSet)" and the first getEnvelope inside the while
statement then goes into the else portion for all of the remaining
features in the dataset.

Bruce


-Original Message-
From: Frank Warmerdam [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2008 11:55 AM
To: Clay, Bruce
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] GetExtent method

Clay, Bruce wrote:
> When I used the debugger to step into the OGRLayer GetExtent method I 
> noticed that it walks through all of the features in the dataset and 
> tests the envelope of each feature in the set.
> 
>  
> 
> Are there any driver specific optimizations (i.e. OCI)  that could be 
> called instead of this one since it does take a long time for a large 
> dataset?
> 
>  
> 
> I realize we can create our own but I would like to use a built in 
> function if it is available.
> 
>  
> 
> Frank: Since you are working in the OCI driver would this be a good
time 
> to add something like:
> 
> select min(a1.SHAPE.SDO_POINT.X),
> 
>  max(a1.SHAPE.SDO_POINT.X),
> 
>  min(a1.SHAPE.SDO_POINT.Y),
> 
>  max(a1.SHAPE.SDO_POINT.Y) from DatasetName a1;
> 
>  
> 
> Of course that falls back on the first question, is there already a 
> built in method.

Bruce,

We already have a specialized implementation of
OGROCITableLayer::GetExtent()
at:

http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrsf_frmts/oci/ogroci
tablelayer.cpp#L1072

I wonder if this optimized case is failing for some reason for you?  Or
perhaps you are working with an result from ExecuteSQL()?

Best regards,
-- 
---+
--
I set the clouds in motion - turn up   | Frank Warmerdam,
[EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] GetExtent method

2008-09-02 Thread Clay, Bruce
When I used the debugger to step into the OGRLayer GetExtent method I
noticed that it walks through all of the features in the dataset and
tests the envelope of each feature in the set.

 

Are there any driver specific optimizations (i.e. OCI)  that could be
called instead of this one since it does take a long time for a large
dataset?

 

I realize we can create our own but I would like to use a built in
function if it is available.

 

Frank: Since you are working in the OCI driver would this be a good time
to add something like:

select min(a1.SHAPE.SDO_POINT.X),

 max(a1.SHAPE.SDO_POINT.X),

 min(a1.SHAPE.SDO_POINT.Y),

 max(a1.SHAPE.SDO_POINT.Y) from DatasetName a1;

 

Of course that falls back on the first question, is there already a
built in method.

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] curve fit question

2008-08-11 Thread Clay, Bruce
Does anyone know of a function in GDAL or related libraries that given a
set of points it will return a new set of points that is or can be used
to create a smoothed polyline?  I have heard about things like linear
fit and least squares but I have not used them and I am quite rusty on
the math used to calculate a smoothed line from a set of points.  I have
done a lot of web searching and found various generic algorithms but I
don't see how to apply them.  For example a linear regression sample
takes in a set of X-Y points but it only returns 3 values of C and
standard deviation. 

 

Any help would be greatly appreciated.

 

Bruce




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev