[mapserver-users] Image Maps
Lowell Filak
lfilak at medinaco.org
Fri Aug 2 05:48:25 PDT 2002
Is the root problem the number of vertices that exist when working on a layer with a lot of polygons?
By 'clipping method' do you mean weeding out vertices? If not, something like weeding would help reduce the number of vertices in the image map which will be weeded anyhow when the image is rendered. You really shouldn't need high detail for a zoomed-out view.?
As for reading the initial data in it should be relatively quick to read the polys->lines->points in for a given shape if everything is retrieved by the index value.
As for the dbf information you only need a single read from the disk for the values. I don't know what the direct PHP XBase access is called but it should allow something similar to 'SELECT label FROM polygons' and will return a pointer in memory to ALL the values in the dbf column in the order they occur which aligns with the shape index value.
HTH
Lowell F.
The following message was sent by Antti.Roppola at brs.gov.au on Fri, 2 Aug 2002 13:00:23 +1000 .
> How about rendering a view of the Shapefile and using the RGB values
> as a key to generate the Image map?
>
> Use something like imlib inside PHP to create an interim image using
> your region as a class-item... This would probably hit the filesystem
> less than the approach you are currently using, plus the rendered image
> would never have more cases to consider than the number of pixels in it.
>
> Basically sample down the detailed data before you start processing.
>
> Antti
>
> -----Original Message-----
> From: Manuel Marichal Pérez [mailto:marichalperez at yahoo.es]
> Sent: Friday, 2 August 2002 12:01 AM
> To: Lista (MapServer)
> Subject: [mapserver-users] Image Maps
>
>
>
> Hi, all. Image maps are a commonly question treated in Mapserver list.
> The solution suggested by MapServer experts is to use Mapscript to read
> the shapes and then build up a image map. If your application uses a
> java viewer (such us ROSA or other) you can build the map using XML (for
> example) and then read it from Java.
>
> Ok. I wrote a PHP/Mapscript function that read the DBF file and extract
> the polygons. Each polygon is assigned a label which is extracted from a
> column of the DBF itself. With this, I make an XML file including the
> map and ROSA read it to manage the "MouseOver" method. This idea works
> fine:
>
> http://www.buscamap.com/simpletest/index.html
>
> The problem here is the layer which the image map is build for. If the
> layer contains very much polygons, this method take a long time to build
> the image map. My question is: it is possible to reduce this time?.
>
> - MapServer is unable to make image maps itself (correct me if not, please)
>
> - If I include a clipping method in the function, I will obtain smaller
> XML files, but the time is not reduced because if I want to know which
> polygons fall in the view and which fall out of it I still have to read
> its coordinates to know it.
>
> - I suppose indexes (shptree) don't help at all because the polygons are
> read in order to be treated and then, index are unuseful here.
>
> :(
>
> What can I do if I need image maps in my application and the layer which I
> need for contains several polygons?. Any ideas?.
>
> Thanks in advance,
> Manuel Marichal Pérez
> marichalperez at yahoo.es
>
>
>
>
>
>
> _______________________________________________________________
> Yahoo! Messenger
> Nueva versión: Webcam, voz, y mucho más ¡Gratis!
> Descárgalo ya desde http://messenger.yahoo.es
>
More information about the MapServer-users
mailing list