[mapserver-users] Mapserver and PostgreSQL

Arjen Vrielink vrielink at sarvision.com
Thu Nov 21 14:45:34 EST 2002


Jan,

bedankt voor je hulp ;)

The use of PostgreSQL is not the issue here (I already build some sort of 
homebrew PHP tool for my own needs by building classes to extract and draw 
geometric attributes from a Postgres db) i.e. I just love Postgres! I was 
just wondering about the Postgis thing. I still think Postgis doesn't really 
add much GIS functionality to Postgres other than the conversion thing and 
some abstraction of Postgres built in functionality. But by being a key 
player in the Mapserver - Postgres connection they hold some pretty strong 
cards... hmm, I'm convinced after all. 

So I will do as you adviced and wait for the 7.3 release of Postgres and 
install both Postgres and Postgis from source code to conquer my spot in the 
webGIS community.

Thanks!
Arjen

On Thursday 21 November 2002 18:50, Jan Hartmann wrote:
> Arjen Vrielink wrote:
>  > Hello All,
>  >
>  > I was wondering if I could connect to a PostgreSQL database directly
>  > from Mapserver. The problem is that we have SuSE 8.1 doing the
>  > installation of PostgreSQL so we don't have the pg src code on our
>  > machine which you need to install / compile PostGIS. Not being convinced
>  > about the benefits of POSTGIS after reading the documentation I decided
>  > I could live without it. That is, until I tried to get Mapserver connect
>  > to my Postgres db --> There are no error messages but I don't get the
>  > layer displayed either (I use an ESRI shapefile which I dumped to SQL
>  > code for testing). So my basic question is: do I really need Postgis
>  > (and what are the benefits of Postgis anyway)? if I really need postgis,
>  > I will get the postgres source code and install it manually on my linux
>  > box.
>  >
>  > Suggestions would be appreciated, thanks
>  >
>  > using:
>  > Linux 2.4.something
>  > PostgreSQL 7.2
>  > Mapserver 3.6
>  > (PHP 4.3.0RC1)
>  >
>  > arjen,
>  > SarVision
>  > Wageningen
>  > The Netherlands
>
> Arjen,
>
> You are not obliged to use PostGIS . MapServer will run quite happily on
> its own (with great functionality). However, if you are on a Linux
> platform, I would certainly advise to add PostGreSQL with the PostGIS
> extension (you cannot connect MapServer to PostgreSQL without it). Reasons:
>
> - You can import every database from Windows (including Access) into
> PostgreSQL by a few mouseclicks using pgAdmin. These data can be
> uniformly queried by full-featured SQL and combined with GIS maps
> - You can import most vector GIS files by using shp2pgsql or ogr2ogr and
> let MapServer build maps based on them. Most important, you can create
> maps based on combinations of geographical queries (e.g. everything
> within a certain distance of selected objects), and regular attribute
> queries (e.g. everything with a certain name).
>
> For this you need the PostgreSQL source code. Personally I don't use the
> locations of  standard distributions like SUSE for this: it's very
> difficult to remember where they put things. I download the source code
> under my $HOME directory and configure everything with ./configure
> --prefix=$HOME. After that you need to install the PostGIS extension. If
> you managed to compile and install MapServer, this should be no problem
> at all. Perhaps you should wait a few days until PostgreSQL 7.3 is
> released.
>
> Hope this helps.
>
>
> Vriendelijke groeten,
>
> Jan
>
> Jan Hartmann
> Department of Geography
> University of Amsterdam
> jhart at frw.uva.nl





More information about the mapserver-users mailing list