[mapserver-users] RE: Dynamically draw different sized ellipses on map

2010-09-08 Thread stoli

Thanks David.

Those are excellent references. I hadn't seen Matt Perry's site before. The
Tissot Indicatrix certainly shows the distortion that I need to deal with
due to map projection. I think I can work out the geometry of the ellipses.

Assuming that the application needs to be capable of rendering up to 100 of
these ellipses at varying locations at any given time, would you say the
most efficient way to do this is to program the app to dynamically build a
shape file and add it as a map layer each time a user requests the page, or
create them as symbols (in which case I think I would need a different layer
for each ellipse). I suppose I might run into URL length limits with the
latter. Is there another possibility that I am missing?
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5511294.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: Dynamically draw different sized ellipses on map

2010-09-09 Thread stoli


To better understand what I am doing, consider this as an example (perhaps
not very realistic, but close enough):

Let’s assume you have a site that allows the user to analyze cell phone
coverage. Your database has the location of all the towers. Each tower
contains various antenna types, each antenna type with a different range.
Occasionally, new towers are added to the database, old towers are removed,
and antenna types are changed. The user selects the antenna type, submits
the request to the server, and the server generates the ellipses that
represent each antenna’s coverage. Those ellipses are overlaid on the map
and the image is returned to the user. 

The map image processing is all done server side via cgi requests. Sounds
like the best way to do this might be to write out a unique shapefile for
each user session. Certain user inputs (like a change in antenna type) will
require their shapefile to be updated (rewritten), while other inputs (like
zooming, panning, etc.)  will not.

Thanks again. If anyone knows of a better way to accomplish this, I'm all
ears.

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5514639.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] RE: Dynamically draw different sized ellipses on map

2010-09-08 Thread Fawcett, David (MPCA)
I think that others will be able to answer this far better than I can.  There 
are likely many ways to do this, it might help if you gave us a little bit more 
info about what you are doing.  

It sounds like the coordinates and area of the polys are determined on the 
client side and then need to be passed to the server for rendering? 

I do see an example in the comments to Matt's post where someone uses MapServer 
MapScript (in place of a CGI call) to build the data and add it to a dynamic 
map.  It looks like they are writing out a shapefile and then using the 
shapefile as the source for a layer.  I wonder if this might lead to unexpected 
results unless you can guarantee unique shapefile names for each map request.  

I believe that if you went the mapscript route, you could just build the poly 
features dynamically and use them in your layer without writing the features 
out to disk.  

I think that optimization will depend on your requirements.  If a user starts a 
session, a data set is built, and then the client requests thousands of tiles 
based on those same features, there will likely be value in writing the 
features out to a shapefile or database.  On the other hand, if the user hits a 
page and only one static map will be drawn based on the new unique features, 
there is likely no need to serialize the features.

David.


-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stoli
Sent: Wednesday, September 08, 2010 11:11 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] RE: Dynamically draw different sized ellipses on map


Thanks David.

Those are excellent references. I hadn't seen Matt Perry's site before. The
Tissot Indicatrix certainly shows the distortion that I need to deal with
due to map projection. I think I can work out the geometry of the ellipses.

Assuming that the application needs to be capable of rendering up to 100 of
these ellipses at varying locations at any given time, would you say the
most efficient way to do this is to program the app to dynamically build a
shape file and add it as a map layer each time a user requests the page, or
create them as symbols (in which case I think I would need a different layer
for each ellipse). I suppose I might run into URL length limits with the
latter. Is there another possibility that I am missing?
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Dynamically-draw-different-sized-ellipses-on-map-tp5508425p5511294.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE: Dynamically draw different sized ellipses on map

2010-09-09 Thread christopher.schmidt

On Sep 9, 2010, at 4:26 PM, ext stoli wrote:

> 
> 
> To better understand what I am doing, consider this as an example (perhaps
> not very realistic, but close enough):
> 
> Let’s assume you have a site that allows the user to analyze cell phone
> coverage. Your database has the location of all the towers. Each tower
> contains various antenna types, each antenna type with a different range.
> Occasionally, new towers are added to the database, old towers are removed,
> and antenna types are changed. The user selects the antenna type, submits
> the request to the server, and the server generates the ellipses that
> represent each antenna’s coverage. Those ellipses are overlaid on the map
> and the image is returned to the user. 
> 
> The map image processing is all done server side via cgi requests. Sounds
> like the best way to do this might be to write out a unique shapefile for
> each user session. Certain user inputs (like a change in antenna type) will
> require their shapefile to be updated (rewritten), while other inputs (like
> zooming, panning, etc.)  will not.

If you can generate the features on the server side, you don't need a shapefile,
I don't think. Just transform the data into GeoJSON features, and deliver them
to the client. The client will maintain these features until they close their 
page/navigate away.

I have been limited on internet access, so I have missed some earlier emails, 
but if you are just generating shapes on the server, loading them in the map
is just as simple as turning them into vector features that you can read and 
reading
them in the client.

-- Chris

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users