[mapserver-users] Using OGR with a TILEINDEX layer

Brent Fraser bfraser at geoanalytic.com
Fri Dec 3 14:52:43 EST 2010


Frank,
   That did the trick!   For those interested, I used:

   LAYER # LINE
     NAME 'LINE'
     STATUS on
     TYPE LINE
     TILEINDEX "G:\GeoData\1_250k\Alberta\AltaLIS\250k_west.shp" # 
"index_west"
     CONNECTIONTYPE OGR
     INCLUDE "AltaLIS_250k_render_inc.map"
   END

Thanks!

Best Regards,
Brent Fraser


On 12/3/2010 11:43 AM, Frank Warmerdam wrote:
> Brent Fraser wrote:
>> I used ogrtindex to create a tileindex shapefile with absolute paths 
>> but get an error in mapserver v5.6.1 when attempting to use it:
>>
>> msDrawMap(): Image handling error. Failed to draw layer named 
>> 'LINE'.
>> msOGRFileOpen(): OGR error. Open failed for OGR connection in layer 
>> `LINE'.  File not found or unsupported format
>>
>>   LAYER
>>     NAME "index_west"
>>     TYPE TILEINDEX
>>     DATA "G:\GeoData\1_250k\Alberta\AltaLIS\250k_west.shp"
>>   END
>>
>>
>>   LAYER # LINE
>>     NAME 'LINE'
>>     STATUS on
>>     TYPE LINE
>>     TILEINDEX "index_west"
>>     CONNECTIONTYPE OGR
>> #    CONNECTION 'G:\GeoData\1_250k\Alberta\AltaLIS\82opos.dgn' # 
>> entities'
>>
>>     INCLUDE "AltaLIS_250k_render_inc.map"
>>   END
>>
>> Does OGR work when referencing a TILEINDEX?
>
> Brent,
>
> I don't have an authoritative answer, but a brief skim of mapogr.cpp 
> seems
> to suggest that it only supports tileindexes in OGR supported formats and
> not in a separate layer.  So, the answer seems to be no, though you 
> should
> be able to just specify the 250k_west.shp file directly as your tileindex
> in the main OGR layer.
>
> It would be desirable to rework mapogr.cpp to support the current more
> general concept of tileindexes but it might be a non-trivial amount of 
> work
> and significant care would be required to avoid backward compatibility
> problems.
>
> Best regards,



More information about the mapserver-users mailing list