[gdal-dev] Warping an already georeferenced image with control points
Hi, I am trying to georeference old maps in two steps: first georeferencing them from the old projection to a modern one, and then ameliorating the georeferenced image by rubber-sheeting it on the base of control points, mostly triangulation points for which the coordinates in the old and new maps are known. The second step causes trouble: if I add control points to the georeferenced image with gdal_translate -gcp , the projection information gets lost. Yet, AFAICS it should be possible: if I use gdaltransform -s_srs EPSG:28992 -t_srs EPSG:28992 -gcp ... , I can use control points with coordinates in EPSG:28992 and get a correct transformation. So: regarding this behavior of gdal_translate, to discard projection information when control points are added: is it a bug or is it the expected behavior? In the last case, how can I rubber-sheet an already georeferenced map? Jan ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Use an existing image for projection
Related to my previous post, is there simply a way to specify an existing image as the template for projection? My problem is that the SID files I received are all in the same projection, yet some have the projection info encoded and others don't. This causes problems as I make mosaics with gdalwarp. If I could do something like -t_srs image1.sid that would be great. Can I get projection out of gdalinfo somehow and into a file? ** Michael Smith State GIS Manager Maine Office of GIS ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Open Aerial Map Access via C#
Hi There, I am using the GDAL build that comes with FWTools2.2.6 (GDAL 1.6.0dev) to try to open OAM (http://openaerialmap.org/static/ww.xml;) using the C# bindings for GDAL and it throws the following exception: GDALWMS: Bad projection specified. The source code that causes the exception to be thrown is : String filename = http://openaerialmap.org/static/ww.xml;; Gdal.AllRegister(); Dataset dataSet = Gdal.OpenShared(fileName, 0); However, I can open and extract pieces of this dataset using gdalinfo and gdal_translate via the command line. Is this a know limitation of the C# bindings or am I doing something wrong? Thanks, M -- Marcelo Simas Oliveira GeoStats LP 530 Means St., Ste. 310 Atlanta, Georgia 30318 (404) 588-1004 www.geostats.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] ticket 1017
Hello Frank, We are on the road to update from gdal 1.40 to gdal 1.6.0 and we want to integrate some of our modifications into gdal source. Ticket 1017 is one of them. Have you planned to insert this modification into gdal trunk ? Did you need more informations ? We need gml driver to read fids as we use these fids to access our data . Regards, Johan. -- Johan Nouvel, RD Engineer http://www.archivideo.com tel : +33 (0)2 99 86 30 20 ARCHIVIDEO, 40 rue des Veyettes, 35000 RENNES, FRANCE ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Open Aerial Map Access via C#
Marcelo, How is your GDAL_WMS.. service configuration looking like? Best regards, Tamas 2009/1/26 Marcelo Oliveira molive...@geostats.com Hi There, I am using the GDAL build that comes with FWTools2.2.6 (GDAL 1.6.0dev) to try to open OAM (http://openaerialmap.org/static/ww.xml;) using the C# bindings for GDAL and it throws the following exception: GDALWMS: Bad projection specified. The source code that causes the exception to be thrown is : String filename = http://openaerialmap.org/static/ww.xml;; Gdal.AllRegister(); Dataset dataSet = Gdal.OpenShared(fileName, 0); However, I can open and extract pieces of this dataset using gdalinfo and gdal_translate via the command line. Is this a know limitation of the C# bindings or am I doing something wrong? Thanks, M -- Marcelo Simas Oliveira GeoStats LP 530 Means St., Ste. 310 Atlanta, Georgia 30318 (404) 588-1004 www.geostats.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
RE: [gdal-dev] Open Aerial Map Access via C#
Here is what the URL returns: LayerSet Name=OAM ShowAtStartup=true ShowOnlyOneLayers=false − ChildLayerSet Name=openaerialmap ShowAtStartup=false ShowOnlyOneLayer=true − QuadTileSet ShowAtStartup=true Nameopenaerialmap/Name DescriptionOpenAerialMap data./Description DistanceAboveSurface0/DistanceAboveSurface − BoundingBox − West Value-180.0/Value /West − South Value-90.0/Value /South − East Value180.0/Value /East − North Value90.0/Value /North /BoundingBox TerrainMappedfalse/TerrainMapped − ImageAccessor LevelZeroTileSizeDegrees180.0/LevelZeroTileSizeDegrees NumberLevels20/NumberLevels TextureSizePixels256/TextureSizePixels ImageFileExtensionjpeg/ImageFileExtension − ImageTileService ServerUrlhttp://tile.openaerialmap.org/tiles//ServerUrl DataSetNameopenaerialmap/DataSetName /ImageTileService /ImageAccessor − ExtendedInformation AbstractSRS:EPSG:4326/Abstract /ExtendedInformation /QuadTileSet /ChildLayerSet /LayerSet -- Marcelo Simas Oliveira GeoStats LP 530 Means St., Ste. 310 Atlanta, Georgia 30318 (404) 588-1004 www.geostats.com From: Tamas Szekeres [mailto:szeker...@gmail.com] Sent: Monday, January 26, 2009 10:24 AM To: Marcelo Oliveira Cc: gdal-dev@lists.osgeo.org Subject: Re: [gdal-dev] Open Aerial Map Access via C# Marcelo, How is your GDAL_WMS.. service configuration looking like? Best regards, Tamas 2009/1/26 Marcelo Oliveira molive...@geostats.com Hi There, I am using the GDAL build that comes with FWTools2.2.6 (GDAL 1.6.0dev) to try to open OAM (http://openaerialmap.org/static/ww.xml;) using the C# bindings for GDAL and it throws the following exception: GDALWMS: Bad projection specified. The source code that causes the exception to be thrown is : String filename = http://openaerialmap.org/static/ww.xml;; Gdal.AllRegister(); Dataset dataSet = Gdal.OpenShared(fileName, 0); However, I can open and extract pieces of this dataset using gdalinfo and gdal_translate via the command line. Is this a know limitation of the C# bindings or am I doing something wrong? Thanks, M -- Marcelo Simas Oliveira GeoStats LP 530 Means St., Ste. 310 Atlanta, Georgia 30318 (404) 588-1004 www.geostats.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Open Aerial Map Access via C#
I wonder how this URL is mapped to the WMS driver by default. For a valid WMS connection string please refer to: http://www.gdal.org/frmt_wms.html This URL is reported by gdalinfo as: gdalinfo http://openaerialmap.org/static/ww.xml ERROR 4: `/vsimem/http/02802DC8.dat' not recognised as a supported file format. ERROR 4: `/tmp/02802DC8.dat' not recognised as a supported file format. gdalinfo failed - unable to open 'http://openaerialmap.org/static/ww.xml'. Best regards, Tamas 2009/1/26 Marcelo Oliveira molive...@geostats.com Tamas, Here is how I specified the source when opening the dataset: String filename = http://openaerialmap.org/static/ww.xml;; Gdal.AllRegister(); Dataset dataSet = Gdal.OpenShared(fileName, 0); Thanks, M -- Marcelo Simas Oliveira GeoStats LP 530 Means St., Ste. 310 Atlanta, Georgia 30318 (404) 588-1004 www.geostats.com *From:* Tamas Szekeres [mailto:szeker...@gmail.com] *Sent:* Monday, January 26, 2009 10:36 AM *To:* Marcelo Oliveira *Cc:* gdal-dev@lists.osgeo.org *Subject:* Re: [gdal-dev] Open Aerial Map Access via C# I just wanted to know how did you specify the GDAL_WMS service description XML when opening the dataset. Because the error you mentioned sounds like you have an invalid Projection tag in this file. Best regards, Tamas 2009/1/26 Marcelo Oliveira molive...@geostats.com Here is what the URL returns: LayerSet Name=OAM ShowAtStartup=true ShowOnlyOneLayers=false - ChildLayerSet Name=openaerialmap ShowAtStartup=false ShowOnlyOneLayer=true - QuadTileSet ShowAtStartup=true Nameopenaerialmap/Name DescriptionOpenAerialMap data./Description DistanceAboveSurface0/DistanceAboveSurface - BoundingBox - West Value-180.0/Value /West - South Value-90.0/Value /South - East Value180.0/Value /East - North Value90.0/Value /North /BoundingBox TerrainMappedfalse/TerrainMapped - ImageAccessor LevelZeroTileSizeDegrees180.0/LevelZeroTileSizeDegrees NumberLevels20/NumberLevels TextureSizePixels256/TextureSizePixels ImageFileExtensionjpeg/ImageFileExtension - ImageTileService ServerUrlhttp://tile.openaerialmap.org/tiles//ServerUrl DataSetNameopenaerialmap/DataSetName /ImageTileService /ImageAccessor - ExtendedInformation AbstractSRS:EPSG:4326/Abstract /ExtendedInformation /QuadTileSet /ChildLayerSet /LayerSet -- Marcelo Simas Oliveira GeoStats LP 530 Means St., Ste. 310 Atlanta, Georgia 30318 (404) 588-1004 www.geostats.com *From:* Tamas Szekeres [mailto:szeker...@gmail.com] *Sent:* Monday, January 26, 2009 10:24 AM *To:* Marcelo Oliveira *Cc:* gdal-dev@lists.osgeo.org *Subject:* Re: [gdal-dev] Open Aerial Map Access via C# Marcelo, How is your GDAL_WMS.. service configuration looking like? Best regards, Tamas 2009/1/26 Marcelo Oliveira molive...@geostats.com Hi There, I am using the GDAL build that comes with FWTools2.2.6 (GDAL 1.6.0dev) to try to open OAM (http://openaerialmap.org/static/ww.xml;) using the C# bindings for GDAL and it throws the following exception: GDALWMS: Bad projection specified. The source code that causes the exception to be thrown is : String filename = http://openaerialmap.org/static/ww.xml;; Gdal.AllRegister(); Dataset dataSet = Gdal.OpenShared(fileName, 0); However, I can open and extract pieces of this dataset using gdalinfo and gdal_translate via the command line. Is this a know limitation of the C# bindings or am I doing something wrong? Thanks, M -- Marcelo Simas Oliveira GeoStats LP 530 Means St., Ste. 310 Atlanta, Georgia 30318 (404) 588-1004 www.geostats.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Use an existing image for projection
Smith, Michael wrote: Related to my previous post, is there simply a way to specify an existing image as the template for projection? My problem is that the SID files I received are all in the same projection, yet some have the projection info encoded and others don't. This causes problems as I make mosaics with gdalwarp. If I could do something like -t_srs image1.sid that would be great. Can I get projection out of gdalinfo somehow and into a file? Michael, I do not plan to extend the -t_srs and related switch to support using a raster file as a template. However, you can cut and paste the coordinate system reported by gdalinfo and put it in a text file, then use the name of this text file as an argument to -t_srs and other similar commandline switches. 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] ticket 1017
Johan Nouvel wrote: Hello Frank, We are on the road to update from gdal 1.40 to gdal 1.6.0 and we want to integrate some of our modifications into gdal source. Ticket 1017 is one of them. Have you planned to insert this modification into gdal trunk ? Did you need more informations ? We need gml driver to read fids as we use these fids to access our data . Johan, I will ask our new maintainer candidate to update the patch for trunk and to attempt to address a few concerns I have with regard to it. If the changes do not seem unduely dangerous it should be practical to back port into 1.6 branch. http://trac.osgeo.org/gdal/ticket/1017 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] Help with Maine state plane US feet
Hey Michael, Have you tried EPSG 102684? There's a esri_extra file in the FWTools/share dir that has additional definitions, including Maine Stateplane West Nad83 Feet. Cheers, Jamie Adams On Mon, Jan 26, 2009 at 6:01 AM, Smith, Michael michael.sm...@maine.govwrote: I am trying to work with several aerial photos which are in Maine State Plane West, NAD83, US feet. This is a commonly-used projection in Maine (along with Maine East), yet it is not found in the pcs.csv file that comes with FWTools/GDAL. In fact although there are several iterations of state plane for Maine in that file, none are in feet. I have hacked around a bit without success. The two EPSG codes I am trying to add are 26847 *http://spatialreference.org/ref/epsg/26847/*http://spatialreference.org/ref/epsg/26847/ and 26848 *http://spatialreference.org/ref/epsg/26848/*http://spatialreference.org/ref/epsg/26848/. I added the values below to the table based on what I saw as examples in other entries: COORD_REF_SYS_CODE COORD_REF_SYS_NAME UOM_CODE SOURCE_GEOGCRS_CODE COORD_OP_CODE COORD_OP_METHOD_CODE SHOW_CRSDEPRECATED PARAMETER_CODE_1 PARAMETER_VALUE_1 PARAMETER_UOM_1 PARAMETER_CODE_2 PARAMETER_VALUE_2 PARAMETER_UOM_2 PARAMETER_CODE_3 PARAMETER_VALUE_3 PARAMETER_UOM_3 PARAMETER_CODE_4 PARAMETER_VALUE_4 PARAMETER_UOM_4 PARAMETER_CODE_5 PARAMETER_VALUE_5 PARAMETER_UOM_5 26847 NAD83 / Maine East (ftUS) 9003426911831 9807 1 0 880143.491108802-68.3 91108805 0. 9201880630 900188070 9001 26848 NAD83 / Maine West (ftUS) 9003426911832 9807 1 0 880142.591108802-70.1 91108805 0.679201880690 900188070 9001 Yet when I use those EPSG codes the imagery does not align correctly (way way off) in GIS software including ArcGIS. I tried two other methods, one using the PROJ4 description and secondly using the ESRI projection file for NAD_1983_StatePlane_Maine_West_FIPS_1802_Feet. In all cases the imagery is way way way out of Maine. Examining the image in ArcGIS shows it is Transverse Mercator and has the same parameters as State Plane feet, but it's screwed up. Yet if I'm in ArcGIS and I assign the projection file to the image manually, it works fine. I intend to put the imagery in MapServer WMS, so I need to get this worked out in GDAL first. Any suggestions? ** Michael Smith State GIS Manager Maine Office of GIS ___ 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] Merge features from two different files.
Hello, We have several Mapinfo Files with the same geometry information but with different features associated: 1.TAB 2.TAB ... N.TAB COMMON.TAB COMMON.TAB covers all the surface from 1.TAB to N.TAB, and are made of polygons, so a polygon present in 1.TAB has an associated polygon with the same coordinates in COMMON.TAB, and the same for the files from 1 to N. 1 to N files have one feature named Value and in COMMON the feature is named Text. We want to append the Text feature in COMMON to every file 1,2,..N, for each polygon in 1,2,..,N file which overlaps with the polygon with the same coordinates in COMMON. Is there a way to achieve this with the OGR tools (ogr2ogr) or a better approach is to load the files in PostGIS and deal with spatial queries? Maybe using the OGR API or other programming APIs? Thanks in advance, -- Félix ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] gdalwarp on a file + world file - different limits
Joaquim Luis wrote: (which executes this command) gdalwarp -s_srs +proj=stere +lat_0=-60 +lon_0=-55 +k=1 +x_0=0 +y_0=0 +a=6378137.000 +b=6356752.314245 out.tif out.tiff Joaquim, I'm curious why you use the above command. What is it intended to do? If it is just to assign the coordinate system you could use gdal_translate with -a_srs. Perhaps the goal is also to rotate non-north up files to be north up? But when I compare the gdalinfo output of the two files they do not agree. Why are the LR coords from the geotiff file different from the tif + .tfw? And where do they come from? ... # -- THE .TFW CONTENTS 677.678633953751# x_inc 0.0 0.0 -677.201365837256# y_inc -1389588.373683023000# X-UL 1335922.909317081300# Y-UL I see the file represented by the TFW does not exactly have square pixels. I presume gdalwarp has developed a square pixel size, and the resulting file had to have it's extents extended a bit to account for the altered pixel size. Perhaps the gdalwarp was actually done to square the pixels? Or perhaps the tfw was improperly computed and the pixels were never really intended to be non-square? 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
[gdal-dev] Using code from the tutorials
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This is my first post to this mailing list, so I'd first like to take the opportunity to say hello to everyone (and I do hope I'm sending this to the right list)! My question is this: I'd like to use some source code from this tutorial: http://www.gdal.org/ogr/ogr_apitut.html as the starting point for a program I'm writing which will convert comma separated text files with coordinates from a total station into ESRI shapefiles. Is this all right? And if so, who should be credited for writing that piece of code? I will release the source code of the finished program under the GPL. Best wishes, Micke Nordin -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkl+JiwACgkQ8W9qdrD6yOhLlQCbBnrMSb+KLNo1dNQicJCBOXYU xMAAn1Os5aImFEU/riaZIYa0j1ScKQJb =jJax -END PGP SIGNATURE- ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] gdalwarp on a file + world file - different limits
Frank, I'm afraid there was nothing so thought in the use of gdalwarp. Yes, the idea is to assign a coordinate system. Since the world file is meant for referencing linear referencing, it could not correctly describe (for instance) a Mercator projected image. So I thought in using gdalwarp. The fact that the pixels in the TFW are not exactly square is beyond our control. Recall that we start with a postscript image and want to end up with an as-good-as-possible geotiff image. Thanks Joaquim Joaquim Luis wrote: (which executes this command) gdalwarp -s_srs +proj=stere +lat_0=-60 +lon_0=-55 +k=1 +x_0=0 +y_0=0 +a=6378137.000 +b=6356752.314245 out.tif out.tiff Joaquim, I'm curious why you use the above command. What is it intended to do? If it is just to assign the coordinate system you could use gdal_translate with -a_srs. Perhaps the goal is also to rotate non-north up files to be north up? But when I compare the gdalinfo output of the two files they do not agree. Why are the LR coords from the geotiff file different from the tif + .tfw? And where do they come from? ... # -- THE .TFW CONTENTS 677.678633953751# x_inc 0.0 0.0 -677.201365837256# y_inc -1389588.373683023000# X-UL 1335922.909317081300# Y-UL I see the file represented by the TFW does not exactly have square pixels. I presume gdalwarp has developed a square pixel size, and the resulting file had to have it's extents extended a bit to account for the altered pixel size. Perhaps the gdalwarp was actually done to square the pixels? Or perhaps the tfw was improperly computed and the pixels were never really intended to be non-square? Best regards, ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Using code from the tutorials
Micke Nordin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This is my first post to this mailing list, so I'd first like to take the opportunity to say hello to everyone (and I do hope I'm sending this to the right list)! My question is this: I'd like to use some source code from this tutorial: http://www.gdal.org/ogr/ogr_apitut.html as the starting point for a program I'm writing which will convert comma separated text files with coordinates from a total station into ESRI shapefiles. Is this all right? And if so, who should be credited for writing that piece of code? I will release the source code of the finished program under the GPL. Micke, I believe I am the author of almost all, or all of the code and text in that document. I grant you rights to use and relicense any and all of the materials in that page as you see fit. 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] Using code from the tutorials
Micke Nordin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This is my first post to this mailing list, so I'd first like to take the opportunity to say hello to everyone (and I do hope I'm sending this to the right list)! My question is this: I'd like to use some source code from this tutorial: http://www.gdal.org/ogr/ogr_apitut.html as the starting point for a program I'm writing which will convert comma separated text files with coordinates from a total station into ESRI shapefiles. Is this all right? And if so, who should be credited for writing that piece of code? I will release the source code of the finished program under the GPL. Micke, I've never seen any copying information for the tutorial codes. I think you should be safe considering the tutorial sources as in public domain and there should not be any need for credits or explicit permission. 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