[postgis-users] Need Help with Postgis

Paragon Corporation lr at pcorp.us
Wed Jul 23 20:16:28 PDT 2008


Jorge,
 
If you don't have the table registered in the geometry_columns table then
that would be the problem like the error says.
 
Alternatively you don't need to have it in geometry_columns if you use this
syntax
 
 
DATA "the_geom FROM pai_vec_250 USING UNIQUE gid USING SRID=4326"
 
 
Where gid has to be a field in your table that uniquely identifies each
record.  I think Mapserver may put on the additional restriction that the
field needs to be an integer,
but I've never tried it with a non-integer unique identifier so I could very
well be wrong.
 
Hope that helps,
Regina

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
jeviloria at cantv.net
Sent: Wednesday, July 23, 2008 8:34 PM
To: Postgis-users at postgis.refractions.net
Subject: [postgis-users] Need Help with Postgis


Hello friends, 
I try to run a MSW as follows:
http://www.sigtruj.org.ve/cgi-sys/mapserv?map=/home/sigtrujo/www
/map/prueba1.map&layers=mun_truj&mode=MAP


map file, is as follows:

MAP
  NAME

mun_t
  SIZE 400 400
  UNITS dd
  INTERLACE ON
  EXTENT -74.65

0.64 -56.89 12.19
  PROJECTION
    'init=EPSG:4189'
  END
 

FONTSET '../fonts/fonts.txt'
  SYMBOLSET '../simbolo/simbolo.txt'
  #

Background color for the map canvas -- change as desired
  IMAGECOLOR

192 192 192
  IMAGEQUALITY 95
  STATUS on
	WEB
		TEMPLATE

"../plantilla.html"
		IMAGEPATH

"/home/sigtrujo/www/tmp/ms_tmp/"
		IMAGEURL "/tmp/ms_tmp/"
		#EMPTY 

"http://www.sigtruj.org.ve/plantilla.html"
		LOG

"../mapservEdenWfsIow.log" 

		METADATA
			"wms_title" 	     "WMS

Demo Server" ##REQUIRED - generates warning in xml output if

missing
			"wms_onlineresourse"

"http://localhost/cgi-bin/mapserver.exe"
			"wms_srs"           

"init=epsg:24719"	
		END 
	END #end web
LAYER
    NAME

"mun"
    TYPE POLYGON
    CONNECTIONTYPE postgis
    CONNECTION

"host=localhost port=5432 user=sigtrujo_test password=andrea08

dbname=sigtrujo_sigtruj"
    DATA "the_geom FROM pai_vec_250"
   

METADATA
      "wms_title" "pai_vec_250"
    END
    STATUS

DEFAULT
    TRANSPARENCY 45
    PROJECTION
   

"init=EPSG:4189"
    END
    LABELITEM "nombre"
    CLASS
     

NAME "pai_vec_250" 
       STYLE
         SYMBOL 0 
        

OUTLINECOLOR 110 110 110
         COLOR 127 143 184
       END
   

LABEL 
      SIZE MEDIUM
      COLOR 64 64 64
      OUTLINECOLOR

212 212 212
      POSITION CC
      PARTIALS FALSE
      FORCE

TRUE
      MINDISTANCE 0
      ANGLE 0
      BUFFER 4
     

ENCODING SJIS
     END 
    END
  END
IMAGETYPE

PNG
OUTPUTFORMAT
   NAME PNG
   DRIVER "GD/PNG"
   MIMETYPE

"image/png"
   IMAGEMODE PC256
   EXTENSION "png"
   TRANSPARENT

ON
 END
END
This produces the following error.
msDrawMap(): Image handling error. Failed to draw layer named 'mun'.
prepare_database(): Query error. Error declaring cursor: ERROR: find_srid()
- couldnt find the corresponding SRID - is the geometry registered in the
GEOMETRY_COLUMNS table? Is there an uppercase/lowercase missmatch? With
query string: DECLARE mycursor BINARY CURSOR FOR SELECT
"nombre"::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::tex
t from pai_vec_250 WHERE the_geom && setSRID('BOX3D(-74.65 -2.465,-56.89
15.295)'::BOX3D, find_srid('','pai_vec_250','the_geom') )

I can help solve this problem?. 

thanks

Jorge



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080723/9deaf037/attachment.html>


More information about the postgis-users mailing list