shapefile polygon opens in arcgis but not mapserver
Bart van den Eijnden
BEN at SYNCERA-ITSOLUTIONS.NL
Fri Apr 15 06:18:58 PDT 2005
Gerard,
I would recommend trying to use filemon from http://www.sysinternals.com to determine if the qix files are actually used.
I remember one of my old posts in which I had similar problems, might be informative (or confusing :) ):
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0407/msg00673.html
Secondly, the OGR issue, see the 1.2.6 release notes:
http://www.intevation.de/pipermail/freegis-list/2005-March/002209.html
Shapefile Driver:
- Added support for MapServer style spatial index (.qix).
So that's fairly new.
Does your gdal12.dll have version info? You can check with your right mouse button and then the version tab.
Best regards,
Bart
Bart van den Eijnden
Syncera-ITSolutions
Postbus 270
2600 AG DELFT
tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> gerard barrington <gerard_b_18 at HOTMAIL.COM> 04/15/05 03:03pm >>>
Bart,
I was hoping I could get a little clarification just to be sure I understand what you mean. I should create a .qix file for each shapefile using shptree. Then once they all have a .qix, then I should create the tiledindexes using ogrtindex? Will the tileindexes take the .qix into consideration?
Second, I'm not sure what you mean by the following:
"Also, it depends on the GDAL/OGR version whether or not the qix files are actually used (that's a relatively new feature). If I recall correctly that was added in GDAL/OGR 1.2.6, but Frank knows for sure. "
Thanks for all your help....
Gerard B
>From: Bart van den Eijnden <bartvde at XS4ALL.NL>
>Reply-To: Bart van den Eijnden <bartvde at XS4ALL.NL>
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in arcgis but not mapserver
>Date: Thu, 14 Apr 2005 21:13:37 +0200
>
>Hi Gerard,
>
>I would suggest using ogrtindex instead to build the tileindexes.
>There is
>a little trick that you should not run ogrtindex from the directory
>which
>contains the data (otherwise it does not create an absolute path to
>the
>data in the LOCATION item). So run it from the directory where you
>installed FWTools eg:
>
>for %i in (d:\data\*.shp) do d:\programs\fwtools\bin\ogrtindex
>mytileindex.shp %i
>
>About the performance, have you created shapefile qix indexes (using
>shptree?). Also, it depends on the GDAL/OGR version whether or not
>the qix
>files are actually used (that's a relatively new feature). If I
>recall
>correctly that was added in GDAL/OGR 1.2.6, but Frank knows for
>sure.
>
>I think Mapserver normally scales well with a lot of LAYERs, it may
>have
>to do with your data structures and not the amount of LAYERs.
>
>Best regards,
>Bart
>
>On Thu, 14 Apr 2005 16:39:29 -0230, gerard barrington
><gerard_b_18 at HOTMAIL.COM> wrote:
>
>>Bart, Thanks....your solution worked. None of the entries in the
>>LOCATION field of my dbf file had the '.shp'. So I added it to the
>>entries and the tiledindex displays correctly. (I didn't need to
>>use the
>>0, it works without it.) As a side note, do you know how I could go
>>about editing all my dbf files without having to go into them
>>maunally
>>and add the ending to every entry. I used the tile4ms command to
>>create
>>the tiledindex. Also, the speed of mapserver seems to go down
>>drastically when you add more layers to the map file. My map file
>>currently has 46 layers in it,all of which have a tiledindex as its
>>datasource. What can I do to help speed up the mapserver. Thanks
>>again,
>>Gerard B
>>>From: Bart van den Eijnden <bartvde at XS4ALL.NL>
>>
>>>Reply-To: Bart van den Eijnden <bartvde at XS4ALL.NL>
>>
>>>To: MAPSERVER-USERS at LISTS.UMN.EDU
>>
>>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in
>>>arcgis
>>>but not
>>mapserver
>>>Date: Thu, 14 Apr 2005 20:20:00 +0200
>>
>>>
>>
>>>Gerard,
>>
>>>
>>
>>>does your LOCATION item in your tile-index dbf have c:\shapefile
>>>or
>>
>>>c:\shapefile.shp? Looking at your error message it looks like the
>>
>>>first
>>
>>>option which is incorrect.
>>
>>>
>>
>>>You can also try c:\shapefile.shp,0 in the LOCATION field.
>>
>>>
>>
>>>Hope this helps.
>>
>>>
>>
>>>Best regards,
>>
>>>Bart
>>
>>>
>>
>>>On Thu, 14 Apr 2005 14:47:48 -0230, gerard barrington
>>
>>><gerard_b_18 at HOTMAIL.COM> wrote:
>>
>>>
>>
>>>>hi, using the ogr worked out for a POLYGON layer that did not
>>>>have
>>
>>>>a
>>
>>>>tiledindex. The following worked perfect: LAYER
>>
>>>>NAME "name"
>>
>>>>TYPE POLYGON CONNECTIONTYPE OGR CONNECTION "C:\shapefile.shp" ...
>>
>>>>END
>>
>>>>However, this will not work for tiledindex. On the doc page for
>>>>OGR
>>
>>>>it
>>
>>>>says the following should work but it does not. LAYER
>>
>>>>NAME "nam"
>>
>>>>TYPE POLYGON
>>
>>>>CONNECTIONTYPE OGR
>>
>>>>TILEINDEX "C:\tiledindex.shp"
>>
>>>>... END The first entry in the tiled index is for
>>>>c:\shapefile.shp
>>
>>>>but
>>
>>>>it returns the following error: msDrawMap(): Image handling
>>>>error.
>>
>>>>Failed to draw layer named 'nam'. msOGRFileOpen(): OGR error.
>>>>Open
>>
>>>>failed for OGR connection `c:\shapefile'. File not found or
>>
>>>>unsupported
>>
>>>>format. Any ideas why the tiledindex wouldn't work? I have used
>>
>>>>tiledindexes for points and lines and it works fine. Thanks
>>>>again!
>>
>>>>Gerard B.
>>
>>>>
>>
>>>>>From: Bart van den Eijnden <bartvde at XS4ALL.NL>
>>
>>>>
>>
>>>>>Reply-To: Bart van den Eijnden <bartvde at XS4ALL.NL>
>>
>>>>
>>
>>>>>To: MAPSERVER-USERS at LISTS.UMN.EDU
>>
>>>>
>>
>>>>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in
>>
>>>>>arcgis
>>
>>>>>but not
>>
>>>>mapserver
>>
>>>>>Date: Wed, 13 Apr 2005 21:18:12 +0200
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>Hi,
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>It should work if you are using Mapserver 4.4 or later.
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>Otherwise try showing it through OGR.
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>CONNECTIONTYPE OGR
>>
>>>>
>>
>>>>>CONNECTION "path/my.shp"
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>Best regards,
>>
>>>>
>>
>>>>>Bart
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>On Wed, 13 Apr 2005 16:45:50 -0230, gerard barrington
>>
>>>>
>>
>>>>><gerard_b_18 at HOTMAIL.COM> wrote:
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>>I checked with ogrinfo and the shapefile is a <3D POLYGON>.
>>>>>>Other
>>
>>>>
>>
>>>>>>shape
>>
>>>>
>>
>>>>>>files I have show up simply as <POLYGON> when checked with
>>
>>>>>>ogrinfo.
>>
>>>>
>>
>>>>>>Is
>>
>>>>
>>
>>>>>>there anything i can do to show this polygon in mapserver?
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>From: Bart van den Eijnden <bartvde at XS4ALL.NL>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>Reply-To: Bart van den Eijnden <bartvde at XS4ALL.NL>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>To: MAPSERVER-USERS at LISTS.UMN.EDU
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>Subject: Re: [UMN_MAPSERVER-USERS] shapefile polygon opens in
>>
>>>>
>>
>>>>>>>arcgis
>>
>>>>
>>
>>>>>>>but not
>>
>>>>
>>
>>>>>>mapserver
>>
>>>>
>>
>>>>>>>Date: Wed, 13 Apr 2005 20:32:42 +0200
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>Hi,
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>are you sure it is not a polyline shape? Did you try TYPE
>>>>>>>LINE?
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>Otherwise open it up with ogrinfo and see what it says
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>(http://fwtools.maptools.org).
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>Best regards,
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>Bart
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>On Wed, 13 Apr 2005 16:04:39 -0230, gerard barrington
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>><gerard_b_18 at HOTMAIL.COM> wrote:
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>Hi list, I have a polygon shapefile which I can open and view
>>
>>>>>>>>in
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>ArcExplorer and everything looks perfect. However, when I try
>>
>>>>>>>>to
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>use the
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>same shapefile as data for a LAYER of TYPE POLYGON, I get the
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>following
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>exception: msDrawMap(): Image handling error. Failed to draw
>>
>>>>
>>
>>>>>>>>layer
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>named
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>'aal135'. msDrawShape(): General error message. Only polygon
>>
>>>>
>>
>>>>>>>>shapes
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>can
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>be drawn using a POLYGON layer definition. So I tried
>>>>>>>>switching
>>
>>>>
>>
>>>>>>>>the
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>TYPE
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>in my layer to POINT and a couple of points along the border
>>>>>>>>of
>>
>>>>
>>
>>>>>>>>the
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>polygon showed up. I know the shapefile is a polygon though
>>
>>>>
>>
>>>>>>>>because
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>it
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>displays as the correct shape in arcExplorer. Can someone
>>>>>>>>tell
>>
>>>>>>>>me
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>why
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>the polygon will show up in ArcExplorer but not in mapserver?
>>
>>>>>>>>Is
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>there
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>anything I can do to fix this problem?? I am at real loss
>>>>>>>>here
>>
>>>>
>>
>>>>>>>>for
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>why
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>this happens and would really appreciate any help.... Thanks
>>
>>>>
>>
>>>>>>>>Gerard
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>>B
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>--
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>>>Using Opera's revolutionary e-mail client:
>>
>>>>
>>
>>>>>>>http://www.opera.com/m2/
>>
>>>>
>>
>>>>>>
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>
>>
>>>>
>>
>>>>>--
>>
>>>>
>>
>>>>>Using Opera's revolutionary e-mail client:
>>
>>>>>http://www.opera.com/m2/
>>
>>>>
>>
>>>
>>
>>>
>>
>>>
>>
>>>--
>>
>>>Using Opera's revolutionary e-mail client:
>>>http://www.opera.com/m2/
>>
>
>
>
>--
>Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
More information about the MapServer-users
mailing list