[Geomoose-users] Feature Report error with Identify Tool
Brent Fraser
bfraser at geoanalytic.com
Thu May 28 09:22:53 PDT 2015
Fernanado,
When Mapserver does the attribute query as requested by the GeoMOOSE
feature_report.php, it applies a spatial filter based on the EXTENT
stated in the map file and a filter on a unique key:
Warning: layerObj :: queryByRect (): [MapServer Error]:
msPostGISLayerWhichShapes (): Error executing query: ERROR: syntax error
at or near "C2BN001"
LINE 1: ... -1 362.227 362.227 -136 -1 -136 -1)) ', 3857) and (16C2BN001)
^
It looks like it's having a problem with the unique key. You specified
<Td> [dxf_text] <a
href="javascript:GeoMOOSE.startService('feature_report',
{'dxf_text':'[dxf_text]','src':'edificio_c2_espacios/C2-ALBERT_EINSTEIN'})">
Report </ a> </ td>
but you may want to try:
<Td> [dxf_text] <a
href="javascript:GeoMOOSE.startService('feature_report',
{'gid':'[gid]','src':'edificio_c2_espacios/C2-ALBERT_EINSTEIN'})">
Report </ a> </ td>
Best Regards,
Brent Fraser
On 5/28/2015 4:10 AM, Fernando wrote:
> Brent, thank you for your replies but how can I georeference the
> building plan correctly ? Actually we don't need to have an real
> coordinate system, that does not matter in the project. We start from
> a DXF AutoCAD drawing and converted into shapefile with ArcTools and
> then import it to POSTGIS. To display online we decided to try GeoMOOSE.
>
> How do you think that would solve the error?
>
>
>
> ------------------------------------------------------------------------
> Date: Wed, 27 May 2015 07:36:02 -0600
> From: bfraser at geoanalytic.com
> To: nando_gcia at hotmail.com; geomoose-users at lists.osgeo.org
> Subject: Re: [Geomoose-users] Feature Report error with Identify Tool
>
> Fernando,
>
> Your EXTENT is set to
>
> EXTENT -136 -1 227 362
> UNITS METERS
>
> while not technically invalid, it means you are mapping an area about
> 400 meters by 400 meters off the coast of Africa. Try setting the
> EXTENT to values for your mapping area.
> Best Regards,
> Brent Fraser
> On 5/27/2015 3:44 AM, Fernando wrote:
>
> Hello again, after making the "Identify" tool to work properly, I
> added the option "feature_report" but fails.
>
> My identify.html file is:
>
> <! - MapServer Template ->
> <Tr bgcolor = "# DEE5EB"> <td colspan = "2"> <b> <u> SPACE </ u>
> </ b> </ tr>
> <Tr>
> <Td align = "right"> <b> IDENTIFIER: </ b> </ td>
> <Td> [dxf_text] <a
> href="javascript:GeoMOOSE.startService('feature_report',
> {'dxf_text':'[dxf_text]','src':'edificio_c2_espacios/C2-ALBERT_EINSTEIN'})">
> Report </ a> </ td>
> </ Tr>
> <Tr>
> <Td align = "right"> <b> Content: </ b> </ td>
> <Td> [content] </ td>
> </ Tr>
> -----------------------------------------------
> My map file is:
>
> MAP
> NAME EDIFICIO_C2_MAP
> STATUS ON
> SIZE 800 800
> EXTENT -136 -1 227 362
> UNITS METERS
>
> INCLUDE "./geomoose_globals.map"
>
> IMAGECOLOR 255 255 255
> IMAGETYPE PNG
> SYMBOLSET "./symbols/symbol.sym"
> FONTSET "./fonts/fontset.list"
> TRANSPARENT FALSE
> RESOLUTION 100
> DEFRESOLUTION 100
> CONFIG "MS_ERRORFILE" "/ms4w/ms_error_c2.txt"
> DEBUG 5
>
> OUTPUTFORMAT
> NAME png
> DRIVER "AGG/PNG"
> MIMETYPE "image/png"
> IMAGEMODE PC256
> EXTENSION "png"
> FORMATOPTION "GAMMA=0.75"
> END
> -----------------------------------
>
> My parcel.xml file is:
>
> <feature-report>
> <!-- query informtion -->
> <query item="dxf_text" string="%qstring%"/>
>
> <!-- This is the template -->
> <template>parcel_template.pdf</template>
>
> <!-- this is the location of the map in the template -->
> <map x="0.92" y="2.18" w="6.69" h="3.68"/>
>
> <!-- This is a list of where the fields are to be printed on
> the template -->
> <fields>
> <field x=".5" y="7.25" src="%dxf_text%"
> title="IDENTIFICADOR:"/>
> <field x=".5" y="7.45" src="%contenido%" title="CONTENIDO:"/>
>
> <field x=".5" y="8.25" src="%area%" title="AREA:"
> format='%0.2f'/>
> <field x=".5" y="8.45" src="%perimeter%" title="PERIMETRO:"/>
> </fields>
> </feature-report>
>
> ------------
>
>
> Test search results:
>
> Detailed information for the area you clicked on the map ...
> Ground Coordinates
> X: 116.27685546875
> Y: 299.78662109375
>
> SPACES
> IDENTIFIER: 16C2BN001 Report
> CONTENTS: DEPARTMENT HALL. PHYSICAL
> LOCATION TYPE: HALL
> USE TYPE: COMMON AREA
>
> -----------------------------------------
>
> Error when I click on the hyperlink "Report":
>
> Warning: layerObj :: queryByRect (): [MapServer Error]:
> msPostGISLayerWhichShapes (): Error executing query: ERROR: syntax
> error at or near "C2BN001"
> LINE 1: ... -1 362.227 362.227 -136 -1 -136 -1)) ', 3857) and
> (16C2BN001)
> ^
> in C: \ MS4W \ apps \ geomoose2 \ htdocs \ php \
> feature_report.php on line 72
>
> Warning: MapObj :: SetExtent (): [MapServer Error]: SetExtent ():
> Given extent map is invalid. Check That it is in the form: minx,
> miny, maxx, maxy
> in C: \ MS4W \ apps \ geomoose2 \ htdocs \ php \
> feature_report.php on line 100
>
> Warning: MapObj :: SetExtent (): [MapServer Error]:
> msPostGISLayerWhichShapes (): Error executing query: ERROR: syntax
> error at or near "C2BN001"
> LINE 1: ... -1 362.227 362.227 -136 -1 -136 -1)) ', 3857) and
> (16C2BN001)
> ^
> in C: \ MS4W \ apps \ geomoose2 \ htdocs \ php \
> feature_report.php on line 100
>
> Fatal error: Uncaught exception 'MapScriptException' in C: \ MS4W
> \ apps \ geomoose2 \ htdocs \ php \ feature_report.php: 100
> Stack trace:
> # 0 C: \ MS4W \ apps \ geomoose2 \ htdocs \ php \
> feature_report.php (100) mapObj-> SetExtent (0, 0, 0, 0)
> # 1 {main}
> thrown in C: \ MS4W \ apps \ geomoose2 \ htdocs \ php \
> feature_report.php on line 100
>
>
> Can anyone help me fix the error?
>
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org <mailto:Geomoose-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150528/9b0d2a7a/attachment.html>
More information about the Geomoose-users
mailing list