[gdal-dev] Generating GML from Database - Problem: No decimal values
Hi list, i got a problem by generating a GML-File from the Oracle- and MySQL-DB using ogr2ogr, so I alway getting in MySQL/oracle instead of a float-value an rounded integer-value (mostly 0) without any decimal numbers. Some Info: # Structure MySQL: ID smallint(6) col1float col2float(8,4) col3double col4double(8,4) col5decimal(10,0) col6decimal(6,4) using ogrinfo/ogr2ogr with MySQL: ogrinfo MYSQL: -sql SELECT * from test_decimal_values OGRFeature(sql_statement):3 ID (Integer) = 3 col1 (Real) = 12 col2 (Real) = 12 col3 (Real) = 12 col4 (Real) = 12 col5 (Real) = 12 col6 (Real) = 12.1234 Real Value (every column) in the databese: 12.1234 = Only the values of column col6 [ decimal(6,4)] are right interprated, what about the other decimal value in ogr = My real column is like the col1-column [float] # Structure Oracle: ID NUMBER(2,0) COL1NUMBER COL2NUMBER(6,4) using ogrinfo/ogr2ogr with Oracle: ogrinfo OCI:** -sql SELECT * from test_decimal_values Feature Count: 1 Layer SRS WKT: (unknown) ID: Integer (2.0) COL1: Real (0.0) COL2: Real (6.4) OGRFeature(SELECT * from test_decimal_values):0 ID (Integer) = 1 COL1 (Real) = 12 COL2 (Real) = 12. Real Value (every column) in the databese: 12.3456 = No column-values are right interprated, so what about the decimal value in ogr = My real column is like the col1-column [NUMBER] # So is there any option i got to set or a workaround for that problem, aspacialy in oracle? Best regards, Greq --- WhereGroup GmbH Co. KG Siemensstraße 8 53121 Bonn Germany Gregor Fikoczek Email: gregor.fikoc...@wheregroup.com Fon: +49 (0)228 / 90 90 38 - 25 Fax: +49 (0)228 / 90 90 38 - 11 i...@wheregroup.com www.wheregroup.com Amtsgericht Bonn, HRA 6788 --- Komplementärin: WhereGroup Verwaltungs GmbH vertreten durch: Olaf Knopp, Peter Stamm --- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area
Thanks, but I can't yet understand... I have a map of the whole world. It is 640 pixel wide. Planar world is 44.000.000 meters wide so which number should I specify as A?? The same applies for E. About C and F: which coordinates should I specify? Lat and Lon? This would be 90,-180, I guess, being the map centered on Lat,Lon=0,0 and 360° wide and 180° tall. Thanks for your pacience. (Please reply on the list, others could be interested!) bye, Jumpjack *** REPLY SEPARATOR *** On 09/02/2009 at 13.47 Wendy Fay Stevenson wrote: As long as the world file is the same name as the input file to gdalwarp, it will work. As for specifying the world file: A: number of meters across / number of pixels across D B: 0 E: -1 * number of meters in length / number of pixels in length C and F specify the center of the top left pixel in eastings and northings, i.e. where on the projection the first pixel corresponds to. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Fwd: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area
I tried georeferencing one of these images ( http://www.oera.net/How2/TextureMaps2.htm ) using MapWindow GIS; the pogram generated a .jgw file, which then I fixed by replacing , by . and changing something like 179.12345 to 180.0 . Then I tried again this command: gdalwarp -s_srs +proj=merc -t_srs +proj=laea world.jpg dest.jpg Ok, program now does not complain for any error... but what I get as output is EXACTLY the SAME image!!! What's wrong now? And how do I specify the center of the Lambert projection to be on north pole? *** BEGIN FORWARDED MESSAGE *** On 09/02/2009 at 13.47 jumpjack jumpj...@libero.it wrote: From: jumpjack jumpj...@libero.it To: Wendy Fay Stevenson steve...@erau.edu CC: gdal-dev@lists.osgeo.org Date: Tue, 10 Feb 2009 18:48:45 +0100 Subject: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area Thanks, but I can't yet understand... I have a map of the whole world. It is 640 pixel wide. Planar world is 44.000.000 meters wide so which number should I specify as A?? The same applies for E. About C and F: which coordinates should I specify? Lat and Lon? This would be 90,-180, I guess, being the map centered on Lat,Lon=0,0 and 360° wide and 180° tall. Thanks for your pacience. (Please reply on the list, others could be interested!) bye, Jumpjack *** REPLY SEPARATOR *** On 09/02/2009 at 13.47 Wendy Fay Stevenson wrote: As long as the world file is the same name as the input file to gdalwarp, it will work. As for specifying the world file: A: number of meters across / number of pixels across D B: 0 E: -1 * number of meters in length / number of pixels in length C and F specify the center of the top left pixel in eastings and northings, i.e. where on the projection the first pixel corresponds to. *** END FORWARDED MESSAGE *** ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: Fwd: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area
I think you don't define enough the projections and should specify more parameters. PROJ.4 documentation and the following links may be helpful : http://www.remotesensing.org/geotiff/proj_list/mercator_1sp.html http://www.remotesensing.org/geotiff/proj_list/mercator_2sp.html http://www.remotesensing.org/geotiff/proj_list/lambert_azimuthal_equal_area.html Le Tuesday 10 February 2009 20:52:11 jumpjack, vous avez écrit : I tried georeferencing one of these images ( http://www.oera.net/How2/TextureMaps2.htm ) using MapWindow GIS; the pogram generated a .jgw file, which then I fixed by replacing , by . and changing something like 179.12345 to 180.0 . Then I tried again this command: gdalwarp -s_srs +proj=merc -t_srs +proj=laea world.jpg dest.jpg Ok, program now does not complain for any error... but what I get as output is EXACTLY the SAME image!!! What's wrong now? And how do I specify the center of the Lambert projection to be on north pole? *** BEGIN FORWARDED MESSAGE *** On 09/02/2009 at 13.47 jumpjack jumpj...@libero.it wrote: From: jumpjack jumpj...@libero.it To: Wendy Fay Stevenson steve...@erau.edu CC: gdal-dev@lists.osgeo.org Date: Tue, 10 Feb 2009 18:48:45 +0100 Subject: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area Thanks, but I can't yet understand... I have a map of the whole world. It is 640 pixel wide. Planar world is 44.000.000 meters wide so which number should I specify as A?? The same applies for E. About C and F: which coordinates should I specify? Lat and Lon? This would be 90,-180, I guess, being the map centered on Lat,Lon=0,0 and 360° wide and 180° tall. Thanks for your pacience. (Please reply on the list, others could be interested!) bye, Jumpjack *** REPLY SEPARATOR *** On 09/02/2009 at 13.47 Wendy Fay Stevenson wrote: As long as the world file is the same name as the input file to gdalwarp, it will work. As for specifying the world file: A: number of meters across / number of pixels across D B: 0 E: -1 * number of meters in length / number of pixels in length C and F specify the center of the top left pixel in eastings and northings, i.e. where on the projection the first pixel corresponds to. *** END FORWARDED MESSAGE *** ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: Fwd: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area
Hi, A couple of things, 1. Planar world is not 44.000.000 meters wide. It follows from the meter definitions that it is 40 000 000 meters 2. Mercator maps cannot span to +/- 90 degrees latitude 3. The images in www.oera.net/How2/TextureMaps2.htm are not Mecator 4. and changing something like 179.12345 to 180.0 . You should not do that. Coordinates in the world file are that of the CENTER of the top left pixel 5. The whole thing was easy task with Mirone. I used the first image on that page and with it just do: Put this inside a file named EarthMap_2500x1250.jgw 0.144000 0.0 0.0 -0.144000 -179.928000 89.928000 and now gdalwarp EarthMap_2500x1250.jpg -s_srs +proj=latlong -t_srs +proj=laea EarthMap_2500x1250.jpg dest.jpg Which will show ... another manifestation of the gdalwarp bug (http://trac.osgeo.org/gdal/ticket/2305) when dealing with global files Joaquim Luis I tried georeferencing one of these images ( http://www.oera.net/How2/TextureMaps2.htm ) using MapWindow GIS; the pogram generated a .jgw file, which then I fixed by replacing , by . and changing something like 179.12345 to 180.0 . Then I tried again this command: gdalwarp -s_srs +proj=merc -t_srs +proj=laea world.jpg dest.jpg Ok, program now does not complain for any error... but what I get as output is EXACTLY the SAME image!!! What's wrong now? And how do I specify the center of the Lambert projection to be on north pole? *** BEGIN FORWARDED MESSAGE *** On 09/02/2009 at 13.47 jumpjack jumpj...@libero.it wrote: From: jumpjack jumpj...@libero.it To: Wendy Fay Stevenson steve...@erau.edu CC: gdal-dev@lists.osgeo.org Date: Tue, 10 Feb 2009 18:48:45 +0100 Subject: Re[4]: [gdal-dev] gdalwarp: mercator to lambert azimutal equeal area Thanks, but I can't yet understand... I have a map of the whole world. It is 640 pixel wide. Planar world is 44.000.000 meters wide so which number should I specify as A?? The same applies for E. About C and F: which coordinates should I specify? Lat and Lon? This would be 90,-180, I guess, being the map centered on Lat,Lon=0,0 and 360° wide and 180° tall. Thanks for your pacience. (Please reply on the list, others could be interested!) bye, Jumpjack *** REPLY SEPARATOR *** On 09/02/2009 at 13.47 Wendy Fay Stevenson wrote: As long as the world file is the same name as the input file to gdalwarp, it will work. As for specifying the world file: A: number of meters across / number of pixels across D B: 0 E: -1 * number of meters in length / number of pixels in length C and F specify the center of the top left pixel in eastings and northings, i.e. where on the projection the first pixel corresponds to. *** END FORWARDED MESSAGE *** ___ 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