[postgis-users]CONNECTION to database thru Mapserver

w m wokar1 at yahoo.com
Mon Mar 14 09:23:37 PST 2005


i did create this shape file myself from the database by using the pgsql2shp command
that was successfull. the shape file was spots.shp
 
when i did ogrinfo spots.shp spots -summary, it was successful and it gave me the following results.  My extent is right, but theres one thing that doesnt seem to match.  in my table in my database, in the longitude column i have the real longitudes and in the latitude column i have the real latitudes but here it shows 32 and 32 respectively(i dont think it should be this way or maybe it is some kind of conversion?). could it be that it has something to do with this?

INFO: Open of `spots.shp'
using driver `ESRI Shapefile' successful.
Layer name: spots
Geometry: Point
Feature Count: 4
Extent: (45.495410, -73.576830) - (45.543510, -73.520960)
Layer SRS WKT:
(unknown)
NAME: String (15.0)
LATITUDE: Real (32.10)
LONGITUDE: Real (32.10)
CIVIL NUMB: Integer (16.0)
STREET NAM: String (19.0)
POSTAL COD: String (7.0)
 
heres what my table looks like
 
Name             Latitude       Longitude     street name   postal code  the-geom
cafe vienne     45.54351  -73.52096          null                  null            SRID=-1;POINT(45.51351 -73.52096)
 
i have four entries like this

strk at refractions.net wrote:
Are you sure your points fall in your map's EXTENT ?
Do you need to reproject them ?
--strk;

On Mon, Mar 14, 2005 at 09:02:56AM -0800, w m wrote:
> Thank You for your response.
> i made the changes that you suggested but i still have no luck in displaying the points on the map. I'm not sure if a connection is being established to the database or not...how can i know that?? and instead of local host i also tried to insert the ip address of my server but it still didnt work nor did i get any errors.
> any help would be appreciated greately
> thank you
> wokar
> 
> LAYER
> CONNECTIONTYPE postgis
> NAME "Spots" # my table name
> CONNECTION "user=test password=test dbname=MyDataBase host=localhost"
> DATA "the_geom FROM Spots" # the_geom column from table Spots
> STATUS ON
> TYPE POINT 
> CLASS
> COLOR 0 0 0
> OUTLINECOLOR 0 0 0 
> SIZE 2
> END
> END 
> 
> 
> strk at refractions.net wrote:
> On Mon, Mar 14, 2005 at 08:20:55AM -0800, w m wrote:
> > Hi,
> > I created a Mapserver layer definition in order to establish a connection to my database. I would like to display the data from the database on my map.
> > The table spots has just points in the "the_geom" column. All I want to do is to display those points on the map. When I write my layer definition, it gives me no errors but it also doesnt display those points on the map.
> > 
> > Here is my layer definition:
> > 
> > LAYER
> > CONNECTIONTYPE postgis
> > NAME "Spots" # my table name
> > CONNECTION "user=test password=test dbname=MyDataBase host=http://localhost"
> 
> host=localhost
> also, try adding a SIZE to your class
> --strk;
> 
> > DATA "the_geom FROM Spots" # the_geom column from table Spots
> > STATUS ON
> > TYPE POINT 
> > CLASS
> > COLOR 0 0 0
> > OUTLINECOLOR 0 0 0 
> > END
> > END 
> > 
> > Thank You
> > Wokar
> > 
> > 
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources site! 
> > _______________________________________________
> > 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
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> 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

		
---------------------------------
Do you Yahoo!?
 Make Yahoo! your home page   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050314/580d1279/attachment.html>


More information about the postgis-users mailing list