Big ole geometries

828
5
07-10-2011 07:01 PM
KeithSandell
New Contributor III
I have a web app that exposes many very intricate geometries, i.e. the actual coastline of Florida, by county. Many, many vertices.

The user can essentially copy the geometries in the application and modify them as he sees fit, buffer them as he sees fit and then submit the resulting geometry to conduct a spatial query.

The user (yes the app is for 1 person, nice to be Senior Mgmt) requested the coastline be provided as it is. The problem I keep seeing is that with the user using this complex geometry the browser has to send geometries back to the server that have upwards of 10,000 vertices.

I'm sending the geometry to the server as a "feature set", is there a better way to do this?

Perhaps a way to compress it and then uncompress it?

I've told him to use simplier geometries, but again he's Senior Mgmt...I'm just a GIS Manager.

Thanks for any thoughts.
0 Kudos
5 Replies
derekswingley1
Frequent Contributor
How are your geometries being served to your user? Can you generalize them using maxAllowableOffset (available with feature layers and query tasks) before they are sent to the client?
0 Kudos
KeithSandell
New Contributor III
The geometries are being served via a featureLayer.

Technically, I really should not generalize them. The user was very specific about what he wanted and now he's getting what he wished for, or actually I think I am...

I've thought about generalizing the geometries prior to sending them to the server for the query, but I would obviously have to do testing on this to make sure that the maxAllowableOffset is set in such a fashion to maintain the overall integrity of the shape, and in the end the resulting query output.

I'll go ahead and give that a try.

Thanks
0 Kudos
derekswingley1
Frequent Contributor
0 Kudos
StephenLead
Regular Contributor III
if there's only one user, and he really needs the precise geometries, perhaps he should be using a desktop tool like ArcView?

Otherwise, show him in FireBug's NET tab how much data is being transferred each time he pans/zooms on the map, with maxAllowableOffset and without.

Basically, it's a very simple tradeoff between performance and precision - when one goes up, the other goes down, and it's up to him to decide which is more important...
0 Kudos
KeithSandell
New Contributor III
Thanks for all the info. I did mention to him a long time ago about just using ArcView, but he doesn't have time to learn it

I integrated the geometry service generalize method into my app when the geometries are prepared for transmission to the server and it has worked very well. I was able to get a reduction in the number of vertices between 50% and 87% without any loss in accuracy, and reduce processing and query time by about 85% as well.

I used a maxDeviation of 10 (meters).

I did some testing in the desktop environment prior to implementing this and found this to be optimal...for my app.
0 Kudos