On Jan 4, 12:35 pm, "[email protected]" <[email protected]> wrote: > > What server sided scripting did you use. What method did you use to > add the boundry information? is it stored in a database etc.
It's PHP, but could be anything. The boundary information is stored in a MySQL database as a list of coordinates: Area 1;Point 1; x1, y1 Area 1;Point 2; x2, y2 etc because the first incarnation of the database couldn't cope with spatial data, and this is easy and fast. You do need to be sure to use an auto_increment field for point number, though, or garbage- collection/space-filling within the database can cause the points to be stored and retrieved in the wrong order. A spatially-aware database could use WKT or something. The data is also denormalised as another table of area bounding-boxes, in order to help point-in-polygon analysis. That table is consulted first to find a list of candidate areas which could contain the desired point. Analysis of 12854 parishes (amounting to 15439 separate areas) in England is fairly fast, as you saw, because only a dozen areas at most have to be analysed. The boundary of the right area is then encoded on the server using Mark McClure's routines at http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/, transmitted via AJAX and added to the map. > How long did the project take? All told, around a fortnight, including working out the design and getting the boundary data out of MapInfo. If you already have the data, and now I've told you the design and where to find the encoding routines, I'd estimate no more than three or four days, if that. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
