<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Thank you so much Cédric for an elaborative reply.</DIV>
<DIV> </DIV>
<DIV>I want to perform online spatial analysis and show it on the map.</DIV>
<DIV> </DIV>
<DIV>(1) Suppose I enter a buffer zone in a textbox now I want to see how many parks are inside that buffer zone near my house. The parks inside the buffer zone should be highlighted.</DIV>
<DIV> </DIV>
<DIV>(2) As there can be different types of parks, like national park, muncipal park, etc. How to highlight that area having only national parks.</DIV>
<DIV> </DIV>
<DIV>The data of parks and houses are stored in the postgresql/postgis database as point features.</DIV>
<DIV> </DIV>
<DIV>How to implement it using OpenLayers, GeoServer, PostGIS and if required Server side technology like PHP or Java can also be used.<BR></DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>--</DIV>
<DIV>Matt</DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Cédric MOULLET <cedric.moullet@gmail.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> George Matt <georgematt99@yahoo.co.uk><BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> Stephen Woodbridge <woodbri@swoodbridge.com>; users@openlayers.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sun, 25 July, 2010 10:29:49<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [OpenLayers-Users] How to display PostGIS data through Openlayers and JSP<BR></FONT><BR>
<META content=off http-equiv=x-dns-prefetch-control>Hi,<BR>There is for sure not only one answer to your general questions, so let me try to provide one possible answer for them.<BR>Cédric<BR><BR>
<DIV class=gmail_quote>On Sat, Jul 24, 2010 at 10:49 PM, George Matt <SPAN dir=ltr><<A href="mailto:georgematt99@yahoo.co.uk" rel=nofollow target=_blank ymailto="mailto:georgematt99@yahoo.co.uk">georgematt99@yahoo.co.uk</A>></SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV>Thanks, Steve for your reply.</DIV>
<DIV><BR>Ok if your are talking about a mapping server, than lets put it this way. I have installed and configured GeoServer and using the postgis option available in it, the layers are published. Now using WMS or WFS services, layers are requested and shown on the map.</DIV>
<DIV> </DIV>
<DIV>Some question arises:</DIV>
<DIV> </DIV>
<DIV>(1) What is the benefit of using PostGIS then? Where the use of postgis can benefit me? These layers can be easily published in the same way through shape files and shown on the map. OR may be I misunderstood it.</DIV>
<DIV> </DIV></DIV></DIV></BLOCKQUOTE>
<DIV>Quite obvious, but with a database, you have the possibility to use SQL (spatial SQL for PostGis). <BR>For data extraction, WMS or WFS are not very performant. Several web mapping applications are using REST services. These REST services are quite easy to implement with a database in back end and can be fine tuned if you use a database (indexing, spatial indexing) <BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV>(3) About searching: suppose there is a textbox on the page through which the user can search and zoom to a specified feature. (Relating to my example, suppose user enters the name of a road). How this can be achieved. Would the postgis or geoserver sort this problem out?</DIV>
<DIV> </DIV></DIV></DIV></BLOCKQUOTE>
<DIV><BR>In this case, I would implement a search service. Postgres Full Text Search is very performant. SQL queries can also be used, of course. <BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV>(4) If there are multiple layers (For e.g roads, cities, train stations, schools, etc). How can the functionality of searching through a single textbox be implemented.</DIV>
<DIV> </DIV></DIV></DIV></BLOCKQUOTE>
<DIV>Which level of performance do you want to reach ? It's clear that searching in multiple table and in multiple attributes can be quite slow. As solution, you can store everything in one table (only for search purpose. Materialized view can be of interest). Or you can multithread the search, but, in this case, you have probably to take in account the server load. <BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV>(5) How one can perform some spatial analysis and show it on the web? (e.g. A user wants to view major roads with in 5km radius reference to his home)</DIV>
<DIV> </DIV></DIV></DIV></BLOCKQUOTE>
<DIV>Again, with a web service using spatial capabilities of the database. WPS can be of interest in that regard. <BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV>I have seen question/topic related to these issues on the forum, but unfortunately no satisfactory answer was given.</DIV>
<DIV> </DIV></DIV></DIV></BLOCKQUOTE>
<DIV>Again, your questions are very general and can be solved in various ways. The answers depend also of the expected number of users of your web mapping application, the use cases you want to cover, the expected performance and ergonomy, the technology context of your company etc, etc.. This explains also why the OSGEO groups several project (<A href="http://www.osgeo.org/" rel=nofollow target=_blank>http://www.osgeo.org/</A>) that partially overlaps.<BR><BR> <BR></DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV>What are your suggestions?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>--</DIV>
<DIV>Matt</DIV><FONT color=#888888></FONT>
<DIV> </DIV>
<DIV class=hm></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV class=hm><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 13px">
<DIV class=hm><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Stephen Woodbridge <<A href="mailto:woodbri@swoodbridge.com" rel=nofollow target=_blank ymailto="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</A>><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> George Matt <<A href="mailto:georgematt99@yahoo.co.uk" rel=nofollow target=_blank ymailto="mailto:georgematt99@yahoo.co.uk">georgematt99@yahoo.co.uk</A>><BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> <A href="mailto:users@openlayers.org" rel=nofollow target=_blank ymailto="mailto:users@openlayers.org">users@openlayers.org</A><BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sat, 24 July, 2010 19:19:10<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [OpenLayers-Users] How to display PostGIS data through Openlayers and JSP<BR></FONT></DIV>
<DIV class=im><BR>George Matt wrote:<BR>> Hi all,<BR>> Is it possible to show postgis data in openlayers?<BR>> If yes can some body points me to some links or upload a working example to illustrate.<BR>> A usecase can be:<BR>> Consider a road table (road_id, geom, road_name) in the postgre/postgis database. In SQL the select statement can be [SELECT road_id, ST_AsText(road_geom) AS geom, road_name FROM roads;] to select all the roads. Now how to give it to openlayers to show them on the map.<BR><BR><BR>George,<BR><BR>You need some application on the server side like:<BR><BR>- mapserver that can connect to the database and render a map image. There are other application that can do this, some in java if you prefer.<BR><BR>- or you can do the query on the servlet and format the results into GML or GeoJSON, but this in only viable if you have under 1000 features that you are rendering at any give time. And 1000 might be
pushhing the limit depending on the browser performance and memory.<BR><BR>-Steve W<BR></DIV></DIV></DIV></DIV><BR></DIV><BR>_______________________________________________<BR>Users mailing list<BR><A href="mailto:Users@openlayers.org" rel=nofollow target=_blank ymailto="mailto:Users@openlayers.org">Users@openlayers.org</A><BR><A href="http://openlayers.org/mailman/listinfo/users" rel=nofollow target=_blank>http://openlayers.org/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- <BR>
<DIV>Welcome to my world: <A href="http://www.cedricmoullet.com/" rel=nofollow target=_blank>http://www.cedricmoullet.com/</A><BR>My Linked In profile: <A href="http://www.linkedin.com/in/cedricmoullet" rel=nofollow target=_blank>http://www.linkedin.com/in/cedricmoullet</A><BR>Twitter: <A href="http://twitter.com/cedricmoullet" rel=nofollow target=_blank>http://twitter.com/cedricmoullet</A></DIV>
<DIV>Home sweet home: <A href="http://map.geo.admin.ch/?crosshair=bowl&zoom=11&X=185241.24219&Y=561288.90625&bgOpacity=0&selectedNode=node_ch.swisstopo.fixpunkte-lage1" rel=nofollow target=_blank>http://map.geo.admin.ch/?crosshair=bowl&zoom=11&X=185241.24219&Y=561288.90625&bgOpacity=0&selectedNode=node_ch.swisstopo.fixpunkte-lage1</A></DIV><BR>
<DIV style="DISPLAY: inline; VISIBILITY: hidden" id=avg_ls_inline_popup></DIV>
<STYLE type=text/css>#avg_ls_inline_popup {padding:0px 0px;margin-left:0px;margin-top:0px;width:240px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:13px;}</STYLE>
<META content=on http-equiv=x-dns-prefetch-control></DIV></DIV></div><br>
</body></html>