[postgis-users] Mapserver ? (was Convert X/Y into geometry)

Mike Leahy mgleahy at fes.uwaterloo.ca
Wed Apr 27 19:13:45 PDT 2005


Jeff

It seems you're right...I took the host parameter out from one of my mapfiles, 
and worked the same as before.

You might want to try adding "using srid=#### using unique oid" to your data 
string (add the appropriate srid for your later, and oid can be replaced with 
any unique column).  Also, do you not need a 'SIZE' parameter in your style for 
the layer?

Did you add your geometry column to your table using the AddGeometryColumn 
function in PostGIS?  I'm not really sure, but Mapserver might be expecting 
information from the geometry_columns table...

Perhaps the mapserver users list would be a good place to check at this point...

Mike.

Mensaje citado por Jeffrey Johnson <ortelius at gmail.com>:

> Thanks, I thought mapserver assumed that if no host was specified. It
> appears to work ... well no error, but doesn't display. I think I have
> some projection issues to work out.
> 
> Thanks again,
> 
> Jeff
> 
> 
> On 4/27/05, Mike Leahy <mgleahy at fes.uwaterloo.ca> wrote:
> > Jeff,
> > 
> > I think you need the host in your connection:
> > 
> > 'user=postgres dbname=paleo host=localhost'
> > 
> > Mike
> > 
> > 
> > Quoting Jeffrey Johnson <ortelius at gmail.com>:
> > 
> > > Ok, It looks like that worked, but now when trying to draw this using
> > > mapserver using the following layer def, I get this error
> > >
> > > LAYER
> > >                NAME localities2
> > >                 CONNECTIONTYPE postgis
> > >                 CONNECTION "user=postgres dbname=paleo"
> > >                 DATA "localities_geom FROM localities"
> > >                 STATUS DEFAULT
> > >                 TYPE POINT
> > >                 CLASS
> > >                         SYMBOL 'circle'
> > >                         COLOR 0 0 0
> > >                         MINSIZE 5
> > >                 END
> > >         END
> > >
> > >
> > > msDrawMap(): Image handling error. Failed to draw layer named
> 'localities2'.
> > > msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with
> > > connect string 'user=postgres dbname=paleo'.
> > > Error reported was 'could not connect to server: `4o@ˆÌU@% Is the
> > > server running locally and accepting connections on Unix domain socket
> > > "/var/run/postgresql/.s.PGSQL.5432"? '.
> > >
> > > I start psql with -U postgres -d paleo, no problem. Mapserver and
> > > postgis are on the same box, and I started postgis with the -i option.
> > >
> > > Anything else I did wrong?
> > >
> > > Thanks,
> > >
> > > Jeff
> > >
> > > On 4/27/05, Jeffrey Johnson <ortelius at gmail.com> wrote:
> > > > I assume you mean like this
> > > >
> > > > update localities set localities_geom=SetSRID(MakePoint(UTM_NORTHING,
> > > > UTM_EASTING), 26711);
> > > >
> > > > Where localities_geom is the point geometry field and 26711 is the
> > > > SRID (NAD27 UTMZ11N)
> > > >
> > > > Seems to work, I'll see what mapserver has to say.
> > > >
> > > > Thanks,
> > > >
> > > > Jeff
> > > >
> > > >
> > > > On 4/27/05, strk at refractions.net <strk at refractions.net> wrote:
> > > > > On Wed, Apr 27, 2005 at 02:03:15PM -0700, Jeffrey Johnson wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > What is the easiest/quickest way to convert a set of x,y points in
> an
> > > > > > existing table into geometry for PostGIS. I have a table LOCALITIES
> > > > > > with UTM_NORTHING and UTM_EASTING fields, and I want to prepare
> this
> > > > > > table for display via mapserver. Not sure how to go about doind
> this.
> > > > >
> > > > > SetSRID(MakePoint(UTM_NORTHING, UTM_EASTING), <SRID>) from
> LOCALITIES;
> > > > >
> > > > > --strk;
> > > > >
> > > > >
> > > > > >
> > > > > > Thanks in advance,
> > > > > >
> > > > > > Jeff
> > > > > > _______________________________________________
> > > > > > postgis-users mailing list
> > > > > > postgis-users at postgis.refractions.net
> > > > > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > > > _______________________________________________
> > > > > postgis-users mailing list
> > > > > postgis-users at postgis.refractions.net
> > > > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > > >
> > > >
> > >
> > 
> > ----------------------------------------
> > This mail sent through www.mywaterloo.ca
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> 




----------------------------------------
This mail sent through www.mywaterloo.ca



More information about the postgis-users mailing list