[OpenLayers-Users] How to display PostGIS data through
Openlayers and JSP
George Matt
georgematt99 at yahoo.co.uk
Sat Jul 24 16:49:41 EDT 2010
Thanks, Steve for your reply.
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.
Some question arises:
(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.
(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?
(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.
(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)
I have seen question/topic related to these issues on the forum, but
unfortunately no satisfactory answer was given.
What are your suggestions?
Thanks,
--
Matt
________________________________
From: Stephen Woodbridge <woodbri at swoodbridge.com>
To: George Matt <georgematt99 at yahoo.co.uk>
Cc: users at openlayers.org
Sent: Sat, 24 July, 2010 19:19:10
Subject: Re: [OpenLayers-Users] How to display PostGIS data through Openlayers
and JSP
George Matt wrote:
> Hi all,
> Is it possible to show postgis data in openlayers?
> If yes can some body points me to some links or upload a working example to
>illustrate.
> A usecase can be:
> 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.
George,
You need some application on the server side like:
- 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.
- 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.
-Steve W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100724/48b316a7/attachment.html
More information about the Users
mailing list