postgis and mapserver again

Agustina Buccella agustina_buccella at YAHOO.COM.AR
Fri Feb 16 05:18:35 PST 2007


Thanks for the answers.... I thought that the problem was the TYPE in the mapfile but the problem was another one... when I try to see data using the URL:
 
 http://localhost/cgi-bin/mapserv?map=/usr/local/apache2/htdocs/mapserver/ejemplo_postgis3.map&mode=map
 
 I receive the following errors:
 
  msDrawMap(): Image handling error. Unable to initialize image. 
  msPrepareImage(): General error message. Image dimensions not specified. 
  msCalculateScale(): General error message. Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000. 
  mapserv(): Web application error. No way to generate map extent. 
 
 My .map file contains the following:
 
 LAYER
   NAME pg_test
   TYPE POINT
   STATUS DEFAULT
   CONNECTIONTYPE POSTGIS
    CONNECTION "host=localhost port=5432 dbname=miprimergis password=**** user=*****"
   DATA "the_geom FROM cities"
 END
 END
 
 and my .sql to load data in the postgis database is:
 
 BEGIN;
 CREATE TABLE "cities" (gid serial PRIMARY KEY,
 "city_name" varchar(40),
 "gmi_admin" varchar(7),
 "admin_name" varchar(42),
 "fips_cntry" varchar(2),
 "cntry_name" varchar(40),
 "status" varchar(50),
 "pop_rank" int2,
 "pop_class" varchar(22),
 "port_id" int2);
 SELECT AddGeometryColumn('','cities','the_geom','-1','POINT',2);
 INSERT INTO "cities" ("city_name","gmi_admin","admin_name","fips_cntry","cntry_n
 ame","status","pop_rank","pop_class","port_id",the_geom) VALUES ('Drammen','NOR-
 BSK','Buskerud','NO','Norway','Provincial capital','6','50,000 to 100,000','2378
 0','01010000000000006066662440000000A099D94D40');
 INSERT INTO "cities" ("city_name","gmi_admin","admin_name","fips_cntry","cntry_n
 ame","status","pop_rank","pop_class","port_id",the_geom) VALUES ('Trinidad','BOL
 -EBE','El Beni','BL','Bolivia','Provincial capital','6','50,000 to 100,000','0',
 '0101000000000000C0CA3950C00000008097AE2DC0');
 END;
 
 I read the same error in the list but it was not the answer....
 
 Thanks!
 Agustina
 
 
 
 
 
 
 
 
 		
---------------------------------
 Preguntá. Respondé. Descubrí.
 Todo lo que querías saber, y lo que ni imaginabas,
 está en Yahoo! Respuestas (Beta).
 Probalo ya! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070216/cdce61ea/attachment.htm>


More information about the MapServer-users mailing list