TILEINDEX problem

Thomas Chesky thomaschesky at YAHOO.COM
Sat Oct 9 14:58:13 PDT 2004


I have some problem with using Tileindex in the layer def. as follows:

I have the Census 2000 School District boundary shapefiles in a directory.
I created a tile index on them with "ogrtindex ti.shp *.shp"
Then I created a test map file using TILEINDEX and it fails.
Below is the detailed list of setup and config.

* Tile index shape is created in/by:
cd /usr/local/mapdata/schooldistrict/
ogrtindex ti.shp *.shp (only shapefiles; should I do ogrtindex ti.shp * rather?)

* Shape files and tile index shape file is in:
/usr/local/mapdata/schooldistrict/

* Map file is
/usr/local/mapapp/schdist.map

MAP
        NAME SchoolDistrict
        SHAPEPATH      "/usr/local/mapdata/"
        SIZE           600 400
        IMAGETYPE      PNG24
        IMAGECOLOR     0 0 0
        LAYER
                NAME schooldistrict
                STATUS OFF
                TYPE POLYGON
                TILEINDEX /usr/local/mapdata/schooldistrict/ti.shp
                CLASS
                        COLOR 255 255 255
                        OUTLINECOLOR 255 255 255
                END
                PROJECTION
                        "init=epsg:4326"
                END
        END
END

* CGI params used in test
mapserv?mode=map&map=/usr/local/mapapp/schdist.map&layer=schooldistrict&mapext=-122.226813776775+37.4764381661621+-122.213167520107+37.4835588561656&mapsize=600+400&map_projection=init%3Depsg:4326

* Error Message by MapServer
Somehow it tries to find the files in /usr/local/mapapp/ and /usr/local/mapdata/
rather than in /usr/local/mapapp/schooldistrict/ . Wierd.

msDrawMap(): Image handling error. Failed to draw layer named 'schooldistrict'.
msTiledSHPOpenFile(): Shapefile error. Unable to open a single tile to use as a template in layer schooldistrict.
msSHPOpenFile(): Unable to access file. (/usr/local/mapapp/sn72_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapdata/sn72_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapapp/sn56_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapdata/sn56_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapapp/sn55_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapdata/sn55_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapapp/sn54_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapdata/sn54_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapapp/sn53_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapdata/sn53_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapapp/sn51_d00.shp,0)
msSHPOpenFile(): Unable to access file. (/usr/local/mapdata/sn51_d00.shp,0)
... [rest skipped, goes all the way to sn51_d00.shp ]



* "ogrinfo -al ti.shp" shows
INFO: Open of `ti.shp'
using driver `ESRI Shapefile' successful.
Layer name: ti
Geometry: Polygon
Feature Count: 52
Extent: (-179.147340, 17.884813) - (179.778470, 71.352561)
Layer SRS WKT:
(unknown)
LOCATION: String (80.0)
OGRFeature(ti):0
  LOCATION (String) = sn01_d00.shp,0
  POLYGON ((-88.47322700 30.22113200,-88.47322700 35.00802800,-84.89089430 35.00
802800,-84.89089430 30.22113200,-88.47322700 30.22113200))
OGRFeature(ti):1
  LOCATION (String) = sn02_d00.shp,0
  POLYGON ((-179.14734000 51.21986200,-179.14734000 71.35256064,179.77847000 71.
35256064,179.77847000 51.21986200,-179.14734000 51.21986200))
... [skipped]
OGRFeature(ti):51
  LOCATION (String) = sn72_d00.shp,0
  POLYGON ((-67.95411900 17.88481300,-67.95411900 18.51575700,-65.22111000 18.51
575700,-65.22111000 17.88481300,-67.95411900 17.88481300))

... [skipped] is normal OGRFeature def., I skipped to make the email smaller


Any idea?

Thanks


---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041009/fd2649c1/attachment.htm>


More information about the MapServer-users mailing list