[postgis-users] problem with OIDS

fsalas fsalas at geocuba.cu
Wed Aug 27 07:55:04 PDT 2008


Regina , 

thanks, very much for your help.

with this sentence I resolve the problem 

DATA "geoloc from consejospopulares USING UNIQUE gid"

 Best Regards,Salas





----- Original Message ----- 
From: "Paragon Corporation" <lr at pcorp.us>
To: "'PostGIS Users Discussion'" <postgis-users at postgis.refractions.net>
Sent: Wednesday, August 27, 2008 4:30 AM
Subject: RE: [postgis-users] problem with OIDS



I recall having similar issues when moving to 8.3.  I think I had to put in
a using UNIQUE in there for some of my layers but mostly layers that were
view based
Try doing

  DATA "geoloc from consejospopulares USING UNIQUE gid USING
SRID=sridgoeshere"

Or 


  DATA "geoloc from consejospopulares USING UNIQUE gid"

Hope that helps,
Regina


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of fsalas
Sent: Tuesday, August 26, 2008 6:07 PM
To: David Fawcett; postgis-users at postgis.refractions.net
Subject: Re: [postgis-users] problem with OIDS

Hi ,David
I Have mapserver 5.2.0

This is my map file:


  #Start of layer definitions
  LAYER
    NAME "consejospopulares"
    GROUP "Mapa"
    STATUS ON
    DATA "geoloc from consejospopulares"
    TYPE POINT
    CONNECTIONTYPE POSTGIS
    CONNECTION "dbname=prueba user=salas password=salas host=localhost"
    SYMBOLSCALE 2000
    TOLERANCE 3
    CLASS
      NAME "consejospopulares"
      TEMPLATE "query.phtml"
      STYLE
        SYMBOL "icon4"
        COLOR 254 000 000
        OUTLINECOLOR 0 0 0
        MINSIZE 5
        MAXSIZE 20
      END
    END
  END
END


 Best Regards,Salas






----- Original Message -----
From: "David Fawcett" <david.fawcett at gmail.com>
To: "fsalas" <fsalas at geocuba.cu>; "PostGIS Users Discussion" 
<postgis-users at postgis.refractions.net>
Cc: "Obe, Regina" <robe.dnd at cityofboston.gov>
Sent: Tuesday, August 26, 2008 2:36 PM
Subject: Re: [postgis-users] problem with OIDS


>I am guessing that you are using ms4w 2.2.8, which would put your
> MapServer version at 5.x.
>
> I haven't used MapLab, does it build and write map files to the
> filesystem?  If so, can you share the text of your map file,
> specifically, the layer definition for consejospopulares?  My
> assumption is that you need to modify the query in your data
> statement.
>
> David.
>
> On Tue, Aug 26, 2008 at 2:29 PM, fsalas <fsalas at geocuba.cu> wrote:
>> Hi, Regina,
>>
>> I have postgreesql 8.3 with postgis_1_3_3_pg83.exe and mapserver 2.2.8
>>
>> This is the message of the Maplab when i try to browse the map File.
>>
>> Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
>> 'consejospopulares'. in 
>> C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php
>> on line 469
>>
>> Warning: [MapServer Error]: prepare_database(): Error declaring cursor:
>> ERROR: column "oid" does not exist LINE 1:
>> ...sbinary(force_collection(force_2d(geoloc)),'NDR'),OID::text ... ^ With
>> query string: DECLARE mycursor BINARY CURSOR FOR SELECT
>> asbinary(force_collection(force_2d(geoloc)),'NDR'),OID::text from
>> consejospopulares WHERE geoloc && setSRID('BOX3D(214616.053511706
>> 284600,230683.946488294 295300)'::BOX3D,
>> find_srid('','consejospopulares','geoloc') ) in
>> C:\ms4w\apps\maplab-2.2\htdocs\mapedit\preview.php on line 469
>>
>> can you Tell me , How I can resolve this situation?
>>
>> Best Regards,Salas
>>
>> ----- Original Message -----
>>
>> From: Obe, Regina
>> To: fsalas ; PostGIS Users Discussion
>> Sent: Tuesday, August 26, 2008 9:29 AM
>> Subject: RE: [postgis-users] problem with OIDS
>> OIDS=true is obsolete because it has limitations on size and PostgreSQL 
>> in
>> general has been trying to get people to stop using it for general user
>> tables.  Mapserver works fine for me without it and uses the gid field.
>>
>> What sort of problem are you having? Could be a completely different 
>> issue
>> or you are running a really old version of mapserver.
>>
>> Hope that helps,
>> Regina
>> ________________________________
>> From: postgis-users-bounces at postgis.refractions.net
>> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of 
>> fsalas
>> Sent: Tuesday, August 26, 2008 9:04 AM
>> To: postgis-users at postgis.refractions.net
>> Subject: [postgis-users] problem with OIDS
>>
>> Hi,
>>
>> in this moment I have problems with mapserver and postgis.
>>
>> This is the sentence create with shp2pgsql.exe why set the
>>
>> WITH (OIDS=FALSE)?;
>>
>> How I can change this to OIDS=TRUE
>>
>> CREATE TABLE areasalud
>> (
>>   gid serial NOT NULL,
>>   codasalud bigint,
>>   "version" bigint,
>>   descasalud character varying(40),
>>   geoloc geometry,
>>   CONSTRAINT areasalud_pkey PRIMARY KEY (gid),
>>   CONSTRAINT enforce_dims_geoloc CHECK (ndims(geoloc) = 2),
>>   CONSTRAINT enforce_geotype_geoloc CHECK (geometrytype(geoloc) =
>> 'MULTIPOLYGON'::text OR geoloc IS NULL),
>>   CONSTRAINT enforce_srid_geoloc CHECK (srid(geoloc) = 2085)
>> )
>> WITH (OIDS=TRUE);
>> ALTER TABLE areasalud OWNER TO postgres;
>>
>>
>> bets regards
>>
>> Salas
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
> 


___________________________________
Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus
----------------------------------------------------------------------
Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  1022653
Definition date:  2008/08/26
MDAV version: 2.2.9



_______________________________________________
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


___________________________________
Dpto de Sistemas Informáticos
Oficina Central Grupo Empresarial GEOCUBA
Este mensaje esta libre de virus. 
Revisado por Kaspersky Antivirus
----------------------------------------------------------------------
Engine version:  4.0.1.14
Engine date:  2002/06/25
Definition count:  1025598
Definition date:  2008/08/27
MDAV version: 2.2.9

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080827/1f4bd4a0/attachment.html>


More information about the postgis-users mailing list