[GeoMoose-users] exact search

Dan Little theduckylittle at gmail.com
Mon Dec 5 08:19:56 PST 2022


Thank you! I believe that gives me enough information that we should be
able to fix this.

I believe mapserver is seeing a string with only numbers in it and casting
it to a number when it makes the SQL statement. However, I believe we can
force it to not do that by adding the following to your mapfile:

MAP
  LAYER
    METADATA
        "gml_foglio_id_type" "Character"
        "gml_mappale_type" "Character"
    END
  END
END

More documentation here: https://mapserver.org/ogc/wfs_server.html


On Thu, Dec 1, 2022 at 7:18 AM flavio rigolon <flavio.rigolon at gmail.com>
wrote:

> Il giorno mer 30 nov 2022 alle ore 21:46 Dan Little
> <theduckylittle at gmail.com> ha scritto:
> >
> > Hi Flavio!
> >
>
> Hi Dan, thank you very much for your tests and answer
>
> > I'm looking into this. We do not have a `eq-str` operator, there is
> likely an error in the Javacript console and the operation isn't finishing.
> That's why you're seeing the "spinner" that never stops.
> >
>
> Ok, I've found the 'eq-str' operator in the 2.* version doc where I
> see that the 'eq' is for numeric data and 'eq-str' for string. So I
> thought that parameters were ok for 3.* version too.
>
> > Testing against the demo, I am able to query using `eq` as the operator
> without any exceptions.
> >
> > `eq` should be the correct operator. Can you use the `eq` operator and
> post the contents of the request body? If that looks normal then we may
> need to look at what's in the Mapfile.
> >
>
> Using the 'eq' operator in Geomoose I obtain this error:
> ------------------
> Error
> msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed
> msPostGISLayerWhichShapes(): Query error. Error executing query. Check
> server logs
> ------------------
>
> and checking the postgresql log I've found this:
>
> ------------------
> ERROR:  operator does not exists: character varying = integer at character
> 572
> HINT:  No operators found with given name and argument types. It may
> be necessary to convert the indicated types.
> INSTRUCTION:  select
>
> "gid"::text,"foglio_id"::text,"mappale"::text,"tipobene"::text,"numero_repertorio"::text,"vincolo"::text,"ex_num_rep"::text,"Note"::text,"tooltip"::text,"Controllo"::text,"AnnoRep"::text,ST_AsBinary(ST_Force2D("the_geom"),'NDR')
> as geom,"gid"::text from particella_patrimonio where "the_geom" &&
> ST_GeomFromText('POLYGON((1684664.20503714
> 5037777.87184059,1684664.20503714 5049622.92254882,1692749.83495607
> 5049622.92254882,1692749.83495607 5037777.87184059,1684664.20503714
> 5037777.87184059))',find_srid('','particella_patrimonio','the_geom'))
> and ((("foglio_id" = 2) and ("mappale" = 23)))
>
> many thanks again!
> flavio
> --
> /"\  ASCII Ribbon Campaign
> \ /  Respect for low technology.
>  X  Keep e-mail messages readable by any computer system.
> / \  Keep it ASCII.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20221205/6691c69c/attachment.htm>


More information about the GeoMoose-users mailing list