[gdal-dev] Setting "INIT_DEST" to nan on windows

2011-05-03 Thread Kyle Shannon
I am using AutoCreateWarpedVRT to warp a dataset.  I grab the the source
nodata for a band using

double noData = poBand->GetNoDataValue( &pbSuccess );

which returns 1.#QNAN... on windows.

I then try to set the INIT_DEST with this using

psWarpOptions->papszWarpOptions =
CSLSetNameValue( psWarpOptions->papszWarpOptions,
 "INIT_DEST", CPLSPrintf( "%lf", noData ) );

This works on linux when it returns nan(0x8), but not on
windows, is there a different string I need to set in the warp options?

Thanks.


/**
 *
 * Kyle Shannon
 * ksshan...@gmail.com
 *
 */
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Help with gdal_translate and WMS/TMS

2011-05-03 Thread Jeremy
Hello,

 

I would like to be able to load a specific area of , for example, Google
Maps using the WMS/TMS driver in GDAL 1.8.  I am able to create a PNG file
of the full world map at the maximum tile level using gdal_translate and the
sample xml file at http://www.gdal.org/frmt_wms_googlemaps_tms.xml:

 

gdal_translate -of PNG -outsize 512 512 frmt_wms_googlemaps_tms.xml
output.png

 

However, I'm having problems loading a specific area.  I've tried all sorts
of combinations of -projwin and -srcwin flags in gdal_translate without
success, .  The sites that have -projwin examples in the GDAL WMS examples
are no longer available (OnEarth and  NYSDOP 2004).  I've also tried
changing the xml fields to reflect my desired area, again without success.

 

Would it be too much trouble to walk me through the steps of creating a PNG
file of Google Maps for Calgary, Canada with the following bounds?

Decimal degrees: upper-left: [-114.2, 51.2], lower-right: [-113.9, 51.0]

Mercator (I think!): upper-left: [-12712685, 6656748], lower-right:
[-12679290, 6621294]

 

Any advice/tips would be appreciated!

 

Thanks in advance,

Jeremy

 

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

Re: [gdal-dev] S57 missing layers

2011-05-03 Thread Gabriel Breahna

Thanks Frank! I set "S57_PROFILE" to "iw" and now I can see all layers.

On 03.05.2011 17:45, Frank Warmerdam wrote:

On 11-05-02 07:28 AM, Gabriel Breahna wrote:

Hello,
I have a S75 file, 1R5NK000.000, from this archive
ftp://www.risserver.nl/ENC/Rotterdam_Amsterdam.zip.
Using the command:
ogrinfo.exe 1R5NK000.000
I can see 31 layers.
Using OpenCPN or SeeMyEnc I can see more layers in the same file:
m_nsys
wtwaxs
feryrt
comare
dismar
but seems ogrinfo despite of the fact all this layers are present into the
s57objectclasses_iw.csv file, is not able to see them.


Gabriel,

Unfortunately it seems the S57 driver does not autodetct the profile and
use the appropriate supporting files currently.  I found things worked
better if I specified the profile as "iw".

  ogrinfo 1R5NK000.000 --config S57_PROFILE iw

You can also set the S57_PROFILE configuration option as an environment
variable.

Note I still get a Generic class which suggests to me that my _iw
files are not completely up to date.

Best regards,


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


Re: [gdal-dev] gdalbuildvrt, gdal_translate, and MODIS HDF files

2011-05-03 Thread Even Rouault
Le mardi 03 mai 2011 15:34:16, Jose Gomez-Dans a écrit :
> Hi,
> 
> > > > I have recently come across the mosaicking magic that is 1) build a
> 
> vrt
> 
> > > > usin gdalbuildvrt and then 2) gdal_translate the vrt to whatever
> 
> format
> 
> > > > I want -- I'm noticing this is a crazy-fast way to do mosaicking
> > > > compared
> 
> I had a similar question on this a while ago, and one thing you have to be
> wary about is that the HDF libraries usually have a finite number of HDF
> files open simultaneously (see ). If
> you plan on using more than (say) 32 files simultaneously, you'll need to
> recompile the HDF library.

There should be no problem assembling more than 32 files in a VRT while keeping 
the number of files opened simultaneously below a certain threshold.

By default, it is set to 100. But you can change it by setting the 
GDAL_MAX_DATASET_POOL_SIZE configuration option/environment variable to another 
value, e.g. 30 in your case.


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


Re: [gdal-dev] create kml file using MySQL database or shape file

2011-05-03 Thread Luca Sigfrido Percich
Hi Murat,

Il giorno mar, 03/05/2011 alle 16.57 +0300, Murat Beyhan ha scritto:
> ogr2ogr -f KML simgmt.kml simgmt.shp -dsco NameField=RegionName
> this can create a file but strangely data collected at one point.

Probably it is a Spatial Reference System related problem: you should
specify the source shapefile SRS. Have a look at the KML file and see if
the points have different coordinates, and see what SRS has been
declared for it. Have a look at the -a_srs, -t_srs and -s_srs options of
ogr2ogr.


> ogr2ogr -f KML sisint.kml MySQL :'host=localhost user=root
> password=mysql_pswd port=3306 dbname=afetler tables=sisint' -sql "SELECT
> latitude,longitude,sisint from sisint"

Try with no space between MySQL and :, and specifying the database name
before any other option:

ogr2ogr -f KML sisint.kml
MySQL:'afetler,host=localhost,user=root,password=mysql_pswd,port=3306,tables=sisint'
 -sql "SELECT latitude,longitude,sisint from sisint"

All the best

Sig


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


[gdal-dev] Re: Fwd: merging shapefiles larger than 4GB

2011-05-03 Thread Jukka Rahkonen
Harsha Ch  gmail.com> writes:

> 
> 
> Thanks all for the replies and pointers. Jukka I am curious how were you able
to merge upto 8GB shape files

Sorry about being unclear. I was appending shapefiles into Spatialite database
instead of merging shapefiles because I met the absolut limit of 4 GB filesize
for the SHP part.  Spatialite database file worked fine till about 8 GB 
filesize.

-Jukka Rahkonen-

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


Re: [gdal-dev] S57 missing layers

2011-05-03 Thread Frank Warmerdam

On 11-05-02 07:28 AM, Gabriel Breahna wrote:

Hello,
I have a S75 file, 1R5NK000.000, from this archive
ftp://www.risserver.nl/ENC/Rotterdam_Amsterdam.zip.
Using the command:
ogrinfo.exe 1R5NK000.000
I can see 31 layers.
Using OpenCPN or SeeMyEnc I can see more layers in the same file:
m_nsys
wtwaxs
feryrt
comare
dismar
but seems ogrinfo despite of the fact all this layers are present into the
s57objectclasses_iw.csv file, is not able to see them.


Gabriel,

Unfortunately it seems the S57 driver does not autodetct the profile and
use the appropriate supporting files currently.  I found things worked
better if I specified the profile as "iw".

  ogrinfo 1R5NK000.000 --config S57_PROFILE iw

You can also set the S57_PROFILE configuration option as an environment
variable.

Note I still get a Generic class which suggests to me that my _iw
files are not completely up to date.

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


Re: [gdal-dev] Re: Fwd: merging shapefiles larger than 4GB

2011-05-03 Thread Harsha Ch
Thanks all for the replies and pointers. Jukka I am curious how were you
able to merge upto 8GB shape files
I am using mapnik to render shape files its able to read shape files larger
than 4Gb. I tried ogr2ogr to merge shape files which its failing after file
size reached to 4G. I looked at the ticket and I see the patch is applied to
gdal and I am building it from source. Could you tell me how did you merge
shape files in this case.
Thank you,
Harsha

On Mon, May 2, 2011 at 9:19 PM, Jukka Rahkonen wrote:

> Brian Wilson  wildsong.biz> writes:
>
> >
> > I am afraid you are out of luck, the shapefile format restricts its size
> to 32
> bit. See bytes 24-27http://en.wikipedia.org/wiki/ShapefileEven if the SHP
> part
> was not so restricted, I bet the DBF part is.
>
> Actually the SHP part is setting the limit. DBF part can be much bigger and
> I
> have myself one with 32 GB. See also
> http://trac.osgeo.org/gdal/ticket/3236
>
> Spatialite has worked fine for me as a target when merging shapefiles but
> only
> up to about 8 GB file size. After that appending new data became too slow.
> It
> was a long time ago and gdal Spatialite driver may be better now.
>
> -Jukka Rahkonen-
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] create kml file using MySQL database or shape file

2011-05-03 Thread Murat Beyhan
Hi friends,

I would like to convert shp file into kml file by following
but I couldn't achieved. Please let me know How I can convert shape file
which I created by using gen2shp.

ogr2ogr -f KML simgmt.kml simgmt.shp -dsco NameField=RegionName
this can create a file but strangely data collected at one point. but
each points have its' own id, latitude and longitude. 

or by using MYSQl database  

ogr2ogr -f KML sisint.kml MySQL :'host=localhost user=root
password=mysql_pswd port=3306 dbname=afetler tables=sisint' -sql "SELECT
latitude,longitude,sisint from sisint"

FAILURE:
Unable to open datasource `MySQL' with the following drivers.
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> Interlis 1
  -> Interlis 2
  -> GMT
  -> SQLite
  -> ODBC
  -> PGeo
  -> OGDI
  -> MySQL
  -> PCIDSK
  -> XPlane
  -> AVCBin
  -> AVCE00
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK






-- 
Murat BEYHAN
Geophysical Engineer, M.Sc.
Prime Ministry
Disaster and Emergency Management Presidency
Earthquake Department
Address: Eskisehir Yolu 12. Km.
Lodumlu/ANKARA
Tel: 312 2872680-1556
email:bey...@deprem.gov.tr



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: [gdal-dev] gdalbuildvrt, gdal_translate, and MODIS HDF files

2011-05-03 Thread Jose Gomez-Dans
Hi,

> > > I have recently come across the mosaicking magic that is 1) build a
vrt
> > > usin gdalbuildvrt and then 2) gdal_translate the vrt to whatever
format
> > > I want -- I'm noticing this is a crazy-fast way to do mosaicking
> > > compared

I had a similar question on this a while ago, and one thing you have to be
wary about is that the HDF libraries usually have a finite number of HDF
files open simultaneously (see ). If
you plan on using more than (say) 32 files simultaneously, you'll need to
recompile the HDF library.

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

[gdal-dev] OGR feature style spec and LABEL style parts - not working apparently

2011-05-03 Thread Simon Payne
Hi Daniel,
 
As requested, I've raised this issue again. If you could take a look at this, 
that would be great.
 
thanks,
 
Simon Payne

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


[gdal-dev] S57 missing layers

2011-05-03 Thread Westerveld, E.P.
Hello,

I also tested S57 data from www.risserver.nl and found the same as
Gabriel Breahna. It seems to me that OpenCPN object queries show
"well-known" layers with uppercase names (BOYLAT LNDARE etc) but also
"less-known" layers with lowercase (boylat, bcnlat). These "less-known"
layers are not shown in ogrinfo. It only shows a layer called "Generic".

I tried to extract these "less-known" layers using the C++ API, but no
success.

Could it be that OGR doesn't accept "less-known" layer(codes) ? 
I understand that OpenCPN uses GDAL/OGR. But apparently the OpenCPN
people added something... 

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