0

Which is the correct way to write the path through the *.Zip S2 imagery package to rich the *.GML vector file(s) ? Does someone knows how to correctly write the path to *.GML file for using it with /vsizip/ ? I would like to target the *.GML vector file(s) from *.SAFE/GRATICULE/QI/ subfolder. I did a try but it doesn't work.

Here is also a link to one of my previous possible related questions.

Thanks in advance for any tip!

  • Where could I get some test data? – user30184 Apr 8 at 11:13
  • Use this link S2 data and use test/test to get data. You'll get only one tile that has specific data. – George Apr 8 at 11:42
0

This works

ogrinfo /vsizip/S2A_MSIL2A_20200403T092021_N0214_R093_T34TFS_20200403T114409.zip/S2A_MSIL2A_20200403T092021_N0214_R093_T34TFS_20200403T114409.SAFE/GRANULE/L2A_T34TFS_A024972_20200403T092024/QI_DATA/MSK_CLOUDS_B00.gml -al -so
INFO: Open of `/vsizip/S2A_MSIL2A_20200403T092021_N0214_R093_T34TFS_20200403T114409.zip/S2A_MSIL2A_20200403T092021_N0214_R093_T34TFS_20200403T114409.SAFE/GRANULE/L2A_T34TFS_A024972_20200403T092024/QI_DATA/MSK_CLOUDS_B00.gml'
      using driver `GML' successful.
Metadata:
  NAME=MSK_CLOUDS pixels mask from data-strip S2A_OPER_MSK_CLOUDS_EPAE_20200403T105032_A024972_T34TFS_B00_MSIL1C

Layer name: MaskFeature
Geometry: Polygon
Feature Count: 204
Extent: (631380.000000, 5125860.000000) - (709800.000000, 5200020.000000)
Layer SRS WKT:
PROJCRS["WGS 84 / UTM zone 34N",
    BASEGEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["UTM zone 34N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",21,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9996,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["unknown"],
        AREA["World - N hemisphere - 18┬░E to 24┬░E - by country"],
        BBOX[0,18,84,24]],
    ID["EPSG",32634]]
Data axis to CRS axis mapping: 1,2
gml_id: String (0.0) NOT NULL
maskType: String (6.0)
| improve this answer | |
  • which version of GDAL are you using ? – George Apr 8 at 14:15
  • Version 3.1.0dev. – user30184 Apr 8 at 16:16
  • I'm using version 3.0.4. I did the test like this: ogrinfo /vsizip/mnt/c/s2_data/S2A_MSIL2A_20200403T092021_N0214_R093_T34TFS_20200403T114409.zip/S2A_MSIL2A_20200403T092021_N0214_R093_T34TFS_20200403T114409.SAFE/GRANULE/L2A_T34TFS_A024972_20200403T092024/QI_DATA/MSK_CLOUDS_B00.gml -al -so As you can see I'm running from different path. For me it does not seem to work. I'm using Ubuntu 18 WSL under Win 10 Pro. Do you believe that it can be an issue ? It returns "Unable to open `/vsizip/...." with the following drivers. – George Apr 8 at 20:34
  • Maybe. I suggest to have a try on the Windows side with GDAL binaries from gisinternals.com or from the OSGeo4W installation. – user30184 Apr 8 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.