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

Jeffrey Johnson ortelius at gmail.com
Wed Apr 27 15:02:13 PDT 2005


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
> >
>


More information about the postgis-users mailing list