[postgis-users] Re: [Mapserver-users] RE: POSTGIS connector - fixed version.

steff stephane.riff at cerene.fr
Thu May 15 03:18:54 PDT 2003


Hi,

I tried the patch but i still have the same problem:

Fatal error: Assertion failed, Could not set shape values: 0, 0

when i do a queryByPoint on postgis layers.
(i use postgis-cvs(15/05/2003) and postgres 7.3.2 with mapserver 3.6.5)

I've got a postgis layer

LAYER
  CONNECTIONTYPE postgis
  NAME "Contour_Departements"
  CONNECTION "dbname=db port=5555 user=apache"
  DATA "the_geom from giscontourdepartement"
  TYPE POLYGON
  STATUS OFF
  GROUP "Contour"
  HEADER blank.html
  FOOTER blank.html
  CLASS
    NAME "Contour_Departements1"
    EXPRESSION ([dept_id] = 0)
    SYMBOL "star"
    SIZE 8
    OUTLINECOLOR 255 0 0
    COLOR 255 0 255
    OVERLAYSYMBOL "downwarddiagonalfill"
    OVERLAYSIZE 6
    OVERLAYCOLOR 0 0 0
    TEMPLATE "itemquery_template.html"
  END
  CLASS
    NAME "Contour_Departements2"
    EXPRESSION ([dept_id] = 1)
    SYMBOL "cross"
    SIZE 8
    OUTLINECOLOR 255 0 0
    COLOR 255 128 64
    TEMPLATE "itemquery_template.html"
  END

  METADATA
   LYRNAME "Contour de Départements"
   TABLE_NAME "giscontourdepartement"
   RESULT_FIELDS "area"
   WMS_SRS  "EPSG:27582"
   WMS_ORDER "2"
  END

END


I want to query this layer with :

    $nClickGeoX = pix2Geo($_SESSION["map_x"], 0, $map->width,$dfMinX,
$dfMaxX, 0);
    $nClickGeoY = pix2Geo($_SESSION["map_y"], 0, $map->height,$dfMinY,
$dfMaxY, 1);
    $oClickGeo = ms_newPointObj();
    $oClickGeo->setXY($nClickGeoX, $nClickGeoY);
    $err = @$map->queryByPoint($oClickGeo, MS_SINGLE, -1);
    if($err == MS_SUCCESS)
    {
      $queryResults=TRUE;
      dumpQueryResults () ;
      print( "<script
language=\"javascript\">parent.queryResult.window.location=\"legend/queryRes
ult.php\";</script>" );
    }


Does the patch suppose to fix my problem, Do i miss something.....
The only thing i'm sure is that i got it work with postgres 7.2.3 and
postgis 0.7.5 with mapserver 3.6.5

Can You help me,

Thanks all,
steff.


----- Original Message -----
From: "Mark Cave-Ayland" <m.cave-ayland at webbased.co.uk>
To: "'David Blasby'" <dblasby at refractions.net>
Cc: <mapserver-users at lists.gis.umn.edu>; <carl.anderson at vadose.org>;
<postgis-users at postgis.refractions.net>
Sent: Wednesday, May 14, 2003 10:06 AM
Subject: [Mapserver-users] RE: POSTGIS connector - fixed version.


> > -----Original Message-----
> > From: David Blasby [mailto:dblasby at refractions.net]
> > Sent: 13 May 2003 17:24
> > To: Mark Cave-Ayland
> > Cc: mapserver-users at lists.gis.umn.edu;
> > carl.anderson at vadose.org; postgis-users at postgis.refractions.net
> > Subject: POSTGIS connector - fixed version.
> >
> >
> > Mark and carl (and others)
> >
> > I have modified mappostgis.c so it is compatible with postgresql 7.3,
> > fixes the "extra funny characters bug", plus a few more fixes.  I've
> > attached it to this message (I've sent it to the list a few times
> > already).  The only known problem with this is that it leaks a little
> > bit of memory.  Several people have been beta-testing this
> > version and
> > they all report that it works 'great'.
>
> (section cut)
>
> >
> > So, this version works with mapserver 3.6 and
> > 3.7-up-until-they-changed-the-map-structure.
> >
> > Dave's TODO:
> > 1. figure out what was changed in the 3.7 version
> > 2. fix memory leak
> > 3. make a 'unified'  version that will compile under 3.6 and
> > the new 3.7
> >
> > Until then, I suggest folks use the included mappostgis.c if you are
> > having problems with your installation.
> >
> > Please tell me if there are any problems with this version (April 14).
> >
> > dave
>
>
> Hi Dave,
>
> Thanks for clarifying that a similar fix had already been posted; I
> tried searching through the archives for mappostgis but didn't find
> anything yesterday, but today there were several hits.... Oh well....
>
> Unfortunately dropping in your replacement mappostgis.c still gives me
> the same problem in that the characters at the end of the previous "geom
> from table" appear in f_table_name at the end of the next subselect
> "geom from (select ... FROM ...)" :(. Perhaps this problem is different
> from the one that you have already fixed?
>
> Once again, as per the patch sent to the list yesterday, I have added a
> terminating null to the end of the table name produced by the sub-select
> parser, and now everything is working as it should.
>
>
> Cheers,
>
> Mark.
>
> ---
>
> Mark Cave-Ayland
> Webbased Ltd.
> Tamar Science Park
> Derriford
> Plymouth
> PL6 8BX
> England
>
> Tel: +44 (0)1752 764445
> Fax: +44 (0)1752 764446
>
>
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender. You
> should not copy it or use it for any purpose nor disclose or distribute
> its contents to any other person.
>
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the postgis-users mailing list