Re: [gdal-dev] Nitf Metadata parsing
I did not set any additional environment variables or macros. I just used my usual gdal build. You are of course free to do whatever you like. BradOn 28 Apr 2021 11:01 am, jovajova24 wrote:Brad, sorry for pushing but I'm going in circles here. It looks like you and Even had this discussion i.e., http://osgeo-org.1560.x6.nabble.com/gdal-dev-Accessing-DES-in-NITF-through-GDAL-td5434141.html You gave me the example of how to output the DES's from the command line, but the builds I'm pulling can't actually get access to the DES data on Windows. Was your build that you showed the output from above complied with the ESRI_NITF flagged as Even suggested? If yes, I can't figure out how to set the ESRI_NITF build flagged, any thoughts? Thanks again. -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html ___ 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
Re: [gdal-dev] Nitf Metadata parsing
Hi, Please note that the DES related PR was merged after the 3.2 release - hence no 3.2.x packages will have the xml:DES metadata domain or the DES related objects. To access the xml:DES metadata domain you will either have to build the source code from the current master branch, or use the nightly docker build, or wait for 3.3 packages to be released. If you use the latest source from master you do not need to enable the ESRI_BUILD flag to access DESs. You can simply use GDALDataset::GetMetadata() or command line as Brad demonstrated - no special build settings required. Hope that helps- Matt On Tue, Apr 27, 2021 at 9:02 PM jovajova24 wrote: > Brad, sorry for pushing but I'm going in circles here. It looks like you > and > Even had this discussion i.e., > > http://osgeo-org.1560.x6.nabble.com/gdal-dev-Accessing-DES-in-NITF-through-GDAL-td5434141.html > > You gave me the example of how to output the DES's from the command line, > but the builds I'm pulling can't actually get access to the DES data on > Windows. > > Was your build that you showed the output from above complied with the > ESRI_NITF flagged as Even suggested? > > If yes, I can't figure out how to set the ESRI_NITF build flagged, any > thoughts? > > Thanks again. > > > > > > -- > Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html > ___ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Matthew S. Baran matthewsba...@gmail.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Nitf Metadata parsing
Brad, sorry for pushing but I'm going in circles here. It looks like you and Even had this discussion i.e., http://osgeo-org.1560.x6.nabble.com/gdal-dev-Accessing-DES-in-NITF-through-GDAL-td5434141.html You gave me the example of how to output the DES's from the command line, but the builds I'm pulling can't actually get access to the DES data on Windows. Was your build that you showed the output from above complied with the ESRI_NITF flagged as Even suggested? If yes, I can't figure out how to set the ESRI_NITF build flagged, any thoughts? Thanks again. -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Nitf Metadata parsing
? On Tue, Apr 27, 2021 at 12:08 AM wrote: > Ok. Have a nice day. > > On 27 Apr. 2021 04:45, jovajova24 wrote: > > Brad, > > Thanks for the reply! > The objects I'm referring to are what I have listed i.e., > > NITFSegmentInfo > NITFDESGetXml > > These objects were changed in the PR I have listed i.e., > > https://github.com/OSGeo/gdal/pull/3153/files#diff-084e5d55477ff6b3acacb5bf240281a52d778c07106fb1fb2b53f1275988a25eR2476-R2488 > > This PR (PR 3153) was merged in Nov 6 2020 so it does not appear to be old > code. > > But, none of these Nitf specific objects are in any releases and I don't > understand why. The include/frmt directory is where they are in the source > code, but I can never find include/frmt in any Windows build. > > Can I ask what makes you think it's old code? > > Also did you create that output with a GDAL build that has the ESRI_NITF > flag set? > > Thanks again! > > > > > -- > Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html > ___ > 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
Re: [gdal-dev] Nitf Metadata parsing
Ok. Have a nice day. On 27 Apr. 2021 04:45, jovajova24 wrote:Brad, Thanks for the reply! The objects I'm referring to are what I have listed i.e., NITFSegmentInfo NITFDESGetXml These objects were changed in the PR I have listed i.e., https://github.com/OSGeo/gdal/pull/3153/files#diff-084e5d55477ff6b3acacb5bf240281a52d778c07106fb1fb2b53f1275988a25eR2476-R2488 This PR (PR 3153) was merged in Nov 6 2020 so it does not appear to be old code. But, none of these Nitf specific objects are in any releases and I don't understand why. The include/frmt directory is where they are in the source code, but I can never find include/frmt in any Windows build. Can I ask what makes you think it's old code? Also did you create that output with a GDAL build that has the ESRI_NITF flag set? Thanks again! -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html ___ 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
Re: [gdal-dev] Nitf Metadata parsing
Brad, Thanks for the reply! The objects I'm referring to are what I have listed i.e., NITFSegmentInfo NITFDESGetXml These objects were changed in the PR I have listed i.e., https://github.com/OSGeo/gdal/pull/3153/files#diff-084e5d55477ff6b3acacb5bf240281a52d778c07106fb1fb2b53f1275988a25eR2476-R2488 This PR (PR 3153) was merged in Nov 6 2020 so it does not appear to be old code. But, none of these Nitf specific objects are in any releases and I don't understand why. The include/frmt directory is where they are in the source code, but I can never find include/frmt in any Windows build. Can I ask what makes you think it's old code? Also did you create that output with a GDAL build that has the ESRI_NITF flag set? Thanks again! -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Nitf Metadata parsing
I'm not sure what you mean by "objects" in this context. Do you mean methods and structures? It seems like you are referring to a lot of older mailing list threads. It is probably better to read the code. For the DES case, you can see how GDAL does it through gdalinfo, with a command like: ./apps/gdalinfo -mdd xml:DES ~/20200723-RIP1B_BIP_Final_Released/07APR2005_Hyperion_331406N0442000E_SWIR172_001_L1R-01B-BIP-GLAS.ntf Which produces: Driver: NITF/National Imagery Transmission Format Files: /home/bradh/20200723-RIP1B_BIP_Final_Released/07APR2005_Hyperion_331406N0442000E_SWIR172_001_L1R-01B-BIP-GLAS.ntf Size is 64, 838 Coordinate System is: GEOGCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,2], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], ID["EPSG",4326]] Data axis to CRS axis mapping: 2,1 GeoTransform = 44.41283704082986, 0.001278659611993035, -0.0002860746050710144 33.69168768134494, -0.0002182539682539298, -0.001073775388291513 Metadata: NITF_ABPP=08 NITF_CCS_COLUMN=0 NITF_CCS_ROW=0 NITF_CLEVEL=05 NITF_ENCRYP=0 NITF_FBKGC= 0, 0, 0 NITF_FDT=20200723130601 NITF_FHDR=NITF02.10 NITF_FSCATP= NITF_FSCAUT= NITF_FSCLAS=U NITF_FSCLSY= NITF_FSCLTX= NITF_FSCODE= NITF_FSCOP=0 NITF_FSCPYS=0 . NITF_PVTYPE=INT NITF_STYPE=BF01 NITF_TGTID= Metadata (xml:DES): Clearly you'll need to parse out the DESDATA part of the segment, using STDI-0002 as a guide. Brad -Original Message- From: gdal-dev On Behalf Of jovajova24 Sent: Monday, 26 April 2021 3:53 AM To: gdal-dev@lists.osgeo.org Subject: [gdal-dev] Nitf Metadata parsing I found this, http://osgeo-org.1560.x6.nabble.com/gdal-dev-NITF-DES-Data-td5448580.html ( and other threads) -- so it sounds like to parse a NITF DES you need to rebuild GDAl with the ESRI_BUILD flag. Is this correct ? Mover-over, I've been trying to find some c++ sample code to parse a NITF DES. Via this thread: http://osgeo-org.1560.x6.nabble.com/gdal-dev-Accessing-a-Nitf-DES-td5485537.html Even pointed me to this link: https://github.com/OSGeo/gdal/pull/3153 ( and thank you for that) but these examples use objects like: NITFSegmentInfo NITFDESGetXml Which when you download 3.2.1 for Windows, none of these specific NITF objects are included in the compilation. Ok DUMB question (and I apologize for this) how do you get access to the listed above nitf specific objects? Is there a way to parse NITF DES data without using these objects? So, now I'm trying to build GDAL myself and I run into the following issue: On VS 2019 it's complaining about the correct version of PROJ >= 6, even though I've set it to version 7.2. Can any one build the latest GDAL on windows outside the CI loop? If so can you post your setup? Thanks again. -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html ___ 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