<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi list,<div class=""><br class=""></div><div class="">Premise: I’m tinkering to add support for datasets from multiple sources (like different subdatasets) in EOxServer (Python, MapScript, …)</div><div class=""><br class=""></div><div class="">Versions: GDAL 1.9.2, MapServer 6.2.2</div><div class=""><br class=""></div><div class="">The sample dataset I try visualize is a MODIS/HDF 4 file with 7+ subdatasets (see [1] for a description for the whole file HDF 4 and [2] for a description of one of the subdatasets).</div><div class=""><br class=""></div><div class="">The subdatasets are not georeferenced, but are supplied with GCPs (and geolocation arrays, which I have not yet tried).</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The bands from the dataset are coming from different subdatasets, so I create a VRT where I collect all the subdatasets and add them as bands to the VRT [3]. Since MapServer is not capable of dealing with GCPs I need to create a rectified VRT (created with the CreateWarpedVRT function) [4].</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">This works quite well, unless I’m in a multithreaded environment (I tested with both apache mod_wsgi with 1 process and 10 threads and Djangos dev server). In this case, when I request more than one WMS request at once I get the error message:</div><div class=""><br class=""></div><div class=""><span style="font-family: monospace; font-size: 13px; widows: 1;" class="">`HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Emis_32' does not exist in the file system, and is not recognised as a supported dataset name.</span></div><div class=""><br class=""></div><div class="">Once I get this error message, ALL further requests are also running into this error and I don’t get any reasonable response unless I restart the server.</div><div class=""><br class=""></div><div class="">Further details: We used the WarpedVRT method earlier to great success when all the sources come from a single dataset (TIFF with GCPs) and I never ran into this problem.</div><div class=""><br class=""></div><div class="">My questions:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>* Is this approach feasible?</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>* Is it possible to just have a single VRT for both collecting the datasets into a single VRT and having the warping instructions?</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>* Any ideas why I get the error message? Any chance to get around this?</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Fabian</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">[1]</div><div class=""><br class=""></div><div class=""><div class="">$ gdalinfo /var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf</div><div class="">Driver: HDF4/Hierarchical Data Format Release 4</div><div class="">Files: /var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf</div><div class="">Size is 512, 512</div><div class="">Coordinate System is `'</div><div class="">Metadata:</div><div class=""> ...</div><div class="">Subdatasets:</div><div class=""> SUBDATASET_1_NAME=HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:LST</div><div class=""> SUBDATASET_1_DESC=[2030x1354] LST MOD_Swath_LST (16-bit unsigned integer)</div><div class=""> SUBDATASET_2_NAME=HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:QC</div><div class=""> SUBDATASET_2_DESC=[2030x1354] QC MOD_Swath_LST (16-bit unsigned integer)</div><div class=""> SUBDATASET_3_NAME=HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Error_LST</div><div class=""> SUBDATASET_3_DESC=[2030x1354] Error_LST MOD_Swath_LST (8-bit unsigned integer)</div><div class=""> SUBDATASET_4_NAME=HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Emis_31</div><div class=""> SUBDATASET_4_DESC=[2030x1354] Emis_31 MOD_Swath_LST (8-bit unsigned integer)</div><div class=""> SUBDATASET_5_NAME=HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Emis_32</div><div class=""> SUBDATASET_5_DESC=[2030x1354] Emis_32 MOD_Swath_LST (8-bit unsigned integer)</div><div class=""> SUBDATASET_6_NAME=HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:View_angle</div><div class=""> SUBDATASET_6_DESC=[2030x1354] View_angle MOD_Swath_LST (8-bit unsigned integer)</div><div class=""> SUBDATASET_7_NAME=HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:View_time</div><div class=""> SUBDATASET_7_DESC=[2030x1354] View_time MOD_Swath_LST (8-bit unsigned integer)</div><div class=""> SUBDATASET_8_NAME=HDF4_SDS:UNKNOWN:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":0</div><div class=""> SUBDATASET_8_DESC=[406x271] Latitude (32-bit floating-point)</div><div class=""> SUBDATASET_9_NAME=HDF4_SDS:UNKNOWN:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":1</div><div class=""> SUBDATASET_9_DESC=[406x271] Longitude (32-bit floating-point)</div><div class=""> SUBDATASET_10_NAME=HDF4_SDS:UNKNOWN:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":2</div><div class=""> SUBDATASET_10_DESC=[2030x1354] LST (16-bit unsigned integer)</div><div class="">...</div><div class="">Corner Coordinates:</div><div class="">Upper Left ( 0.0, 0.0)</div><div class="">Lower Left ( 0.0, 512.0)</div><div class="">Upper Right ( 512.0, 0.0)</div><div class="">Lower Right ( 512.0, 512.0)</div><div class="">Center ( 256.0, 256.0)</div></div><div class=""><br class=""></div><div class="">[2]</div><div class=""><br class=""></div><div class=""><div class="">$ gdalinfo HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Emis_32</div><div class="">Driver: HDF4Image/HDF4 Dataset</div><div class="">Files: /var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf</div><div class=""> /var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf.aux.xml</div><div class="">Size is 1354, 2030</div><div class="">Coordinate System is `'</div><div class="">GCP[ 0]: Id=, Info=</div><div class=""> (2.5,2.5) -> (-17.7197341918945,16.5706329345703,0)</div><div class="">GCP[ 1]: Id=, Info=</div><div class=""> (122.5,2.5) -> (-21.4628753662109,16.2001628875732,0)</div><div class="">GCP[ 2]: Id=, Info=</div><div class=""> (242.5,2.5) -> (-23.6760387420654,15.9492874145508,0)</div><div class="">...</div><div class="">GCP[143]: Id=, Info=</div><div class=""> (1322.5,1982.5) -> (-43.3567504882812,30.9182910919189,0)</div><div class="">Metadata:</div><div class=""> ...</div><div class="">Geolocation:</div><div class=""> LINE_OFFSET=2</div><div class=""> LINE_STEP=5</div><div class=""> PIXEL_OFFSET=2</div><div class=""> PIXEL_STEP=5</div><div class=""> X_BAND=1</div><div class=""> X_DATASET=HDF4_EOS:EOS_SWATH_GEOL:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Longitude</div><div class=""> Y_BAND=1</div><div class=""> Y_DATASET=HDF4_EOS:EOS_SWATH_GEOL:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Latitude</div><div class="">Corner Coordinates:</div><div class="">Upper Left ( 0.0, 0.0)</div><div class="">Lower Left ( 0.0, 2030.0)</div><div class="">Upper Right ( 1354.0, 0.0)</div><div class="">Lower Right ( 1354.0, 2030.0)</div><div class="">Center ( 677.0, 1015.0)</div><div class="">Band 1 Block=1354x738 Type=Byte, ColorInterp=Gray</div><div class=""> Description = Band 32 emissivity</div><div class=""> NoData Value=0</div><div class=""> Offset: 0.49, Scale:0.002</div></div><div class=""><br class=""></div><div class="">[3]</div><div class=""><br class=""></div><div class=""><div class=""><VRTDataset rasterXSize="1354" rasterYSize="2030"></div><div class=""> <GCPList></div><div class=""> <GCP Id="" Pixel="2.5000" Line="2.5000" X="-1.771973419189E+01" Y="1.657063293457E+01" /></div><div class=""> <GCP Id="" Pixel="122.5000" Line="2.5000" X="-2.146287536621E+01" Y="1.620016288757E+01" /></div><div class="">...</div><div class=""> <GCP Id="" Pixel="1322.5000" Line="1982.5000" X="-4.335675048828E+01" Y="3.091829109192E+01" /></div><div class=""> </GCPList></div><div class=""> <VRTRasterBand dataType="UInt16" band="1"></div><div class=""> <SimpleSource></div><div class=""> <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:LST</SourceFilename></div><div class=""> <SourceBand>1</SourceBand></div><div class=""> <SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="UInt16" BlockXSize="1354" BlockYSize="738" /></div><div class=""> </SimpleSource></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="UInt16" band="2"></div><div class=""> <SimpleSource></div><div class=""> <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:QC</SourceFilename></div><div class=""> <SourceBand>1</SourceBand></div><div class=""> <SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="UInt16" BlockXSize="1354" BlockYSize="738" /></div><div class=""> </SimpleSource></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="3"></div><div class=""> <SimpleSource></div><div class=""> <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Error_LST</SourceFilename></div><div class=""> <SourceBand>1</SourceBand></div><div class=""> <SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Byte" BlockXSize="1354" BlockYSize="738" /></div><div class=""> </SimpleSource></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="4"></div><div class=""> <SimpleSource></div><div class=""> <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Emis_31</SourceFilename></div><div class=""> <SourceBand>1</SourceBand></div><div class=""> <SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Byte" BlockXSize="1354" BlockYSize="738" /></div><div class=""> </SimpleSource></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="5"></div><div class=""> <SimpleSource></div><div class=""> <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:Emis_32</SourceFilename></div><div class=""> <SourceBand>1</SourceBand></div><div class=""> <SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Byte" BlockXSize="1354" BlockYSize="738" /></div><div class=""> </SimpleSource></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="6"></div><div class=""> <SimpleSource></div><div class=""> <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:View_angle</SourceFilename></div><div class=""> <SourceBand>1</SourceBand></div><div class=""> <SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Byte" BlockXSize="1354" BlockYSize="738" /></div><div class=""> </SimpleSource></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="7"></div><div class=""> <SimpleSource></div><div class=""> <SourceFilename relativeToVRT="0">HDF4_EOS:EOS_SWATH:"/var/eoxserver/autotest/MOD11_L2.A2015001.0015.005.2015005162430.hdf":MOD_Swath_LST:View_time</SourceFilename></div><div class=""> <SourceBand>1</SourceBand></div><div class=""> <SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Byte" BlockXSize="1354" BlockYSize="738" /></div><div class=""> </SimpleSource></div><div class=""> </VRTRasterBand></div><div class=""></VRTDataset></div></div><div class=""><br class=""></div><div class="">[4]</div><div class=""><br class=""></div><div class=""><div class=""><VRTDataset rasterXSize="2029" rasterYSize="1820" subClass="VRTWarpedDataset"></div><div class=""> <GeoTransform> -4.2266212922257814e+01, 1.1322693568940058e-02, 0.0000000000000000e+00, 3.4413385891072409e+01, 0.0000000000000000e+00, -1.1322693568940058e-02</GeoTransform></div><div class=""> <VRTRasterBand dataType="UInt16" band="1" subClass="VRTWarpedRasterBand"></div><div class=""> <Metadata /></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="UInt16" band="2" subClass="VRTWarpedRasterBand"></div><div class=""> <Metadata /></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="3" subClass="VRTWarpedRasterBand"></div><div class=""> <Metadata /></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="4" subClass="VRTWarpedRasterBand"></div><div class=""> <Metadata /></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="5" subClass="VRTWarpedRasterBand"></div><div class=""> <Metadata /></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="6" subClass="VRTWarpedRasterBand"></div><div class=""> <Metadata /></div><div class=""> </VRTRasterBand></div><div class=""> <VRTRasterBand dataType="Byte" band="7" subClass="VRTWarpedRasterBand"></div><div class=""> <Metadata /></div><div class=""> </VRTRasterBand></div><div class=""> <BlockXSize>512</BlockXSize></div><div class=""> <BlockYSize>128</BlockYSize></div><div class=""> <GDALWarpOptions></div><div class=""> <WarpMemoryLimit>6.71089e+07</WarpMemoryLimit></div><div class=""> <ResampleAlg>NearestNeighbour</ResampleAlg></div><div class=""> <WorkingDataType>UInt16</WorkingDataType></div><div class=""> <SourceDataset relativeToVRT="1">ff71b2c70ab940d6b35ecaa6c4b100e6</SourceDataset></div><div class=""> <Transformer></div><div class=""> <ApproxTransformer></div><div class=""> <MaxError>0.125</MaxError></div><div class=""> <BaseTransformer></div><div class=""> <GenImgProjTransformer></div><div class=""> <SrcGCPTransformer></div><div class=""> <GCPTransformer></div><div class=""> <Order>2</Order></div><div class=""> <Reversed>0</Reversed></div><div class=""> <GCPList></div><div class=""> <GCP Id="" Pixel="2.5000" Line="2.5000" X="-1.771973419189E+01" Y="1.657063293457E+01" /></div><div class=""> <GCP Id="" Pixel="122.5000" Line="2.5000" X="-2.146287536621E+01" Y="1.620016288757E+01" /></div><div class=""> ...</div><div class=""> <GCP Id="" Pixel="1322.5000" Line="1982.5000" X="-4.335675048828E+01" Y="3.091829109192E+01" /></div><div class=""> </GCPList></div><div class=""> </GCPTransformer></div><div class=""> </SrcGCPTransformer></div><div class=""> <DstGeoTransform>-42.26621292225781,0.01132269356894006,0,34.41338589107241,0,-0.01132269356894006</DstGeoTransform></div><div class=""> <DstInvGeoTransform>3732.876162806413,88.31820749288477,0,3039.328555660446,0,-88.31820749288477</DstInvGeoTransform></div><div class=""> </GenImgProjTransformer></div><div class=""> </BaseTransformer></div><div class=""> </ApproxTransformer></div><div class=""> </Transformer></div><div class=""> <BandList></div><div class=""> <BandMapping src="1" dst="1" /></div><div class=""> <BandMapping src="2" dst="2" /></div><div class=""> <BandMapping src="3" dst="3" /></div><div class=""> <BandMapping src="4" dst="4" /></div><div class=""> <BandMapping src="5" dst="5" /></div><div class=""> <BandMapping src="6" dst="6" /></div><div class=""> <BandMapping src="7" dst="7" /></div><div class=""> </BandList></div><div class=""> </GDALWarpOptions></div><div class=""></VRTDataset></div></div></body></html>