Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Working on this, but not quite there yet . . .
- My initial request looks like:
- http://gis.ci.stpaul.mn.us/datasets/PUBLIC/LAND_OWNERSHIP/PARCELS/rc_parcels_assessment.map?
- mode=itemquery&
- qlayer=Parcels-Map-Query&
- qitem=parcelid&qstring=162823340026&
- WIDTH=1069&HEIGHT=917
- I get a “no matching records” found . . . and with DEBUG 5 on the query layer . . .
- CONNECTIONTYPE PostGIS
- CONNECTION “host=localhost dbname=postgres user=mapserv password=****”
- DATA "wkb_geometry from (
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '%qstring%') as subquery using unique objectid srid=200068"
- VALIDATION
- 'pin' '^[0-9]{12}$'
- 'qstring' '^[0-9]{12}$'
- END
- [Thu Jul 13 09:30:00 2017].645602 msPostGISGetPaging called.
- [Thu Jul 13 09:30:00 2017].645665 msPostGISLayerIsOpen called.
- [Thu Jul 13 09:30:00 2017].645672 msPostGISLayerFreeItemInfo called.
- [Thu Jul 13 09:30:00 2017].645675 msPostGISLayerClose called: wkb_geometry from (
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '162823340026') as subquery using unique objectid srid=200068
- [Thu Jul 13 09:30:00 2017].645680 msPostGISLayerOpen called: wkb_geometry from (
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '162823340026') as subquery using unique objectid srid=200068
- [Thu Jul 13 09:30:00 2017].645686 msPostGISLayerOpen: No connection in pool, creating a fresh one.
- [Thu Jul 13 09:30:00 2017].654626 msConnPoolRegister(Parcels-Map-Query,host=localhost dbname=postgres user=mapserv password=****,0x191b510)
- [Thu Jul 13 09:30:00 2017].659333 msPostGISLayerOpen: Got PostGIS version 20200.
- [Thu Jul 13 09:30:00 2017].659343 msPostGISLayerOpen: Forcing 2D geometries: yes.
- [Thu Jul 13 09:30:00 2017].659347 msPostGISEnablePaging called.
- [Thu Jul 13 09:30:00 2017].659349 msPostGISLayerIsOpen called.
- [Thu Jul 13 09:30:00 2017].659354 msPostGISLayerFreeItemInfo called.
- [Thu Jul 13 09:30:00 2017].659359 msPostGISLayerFreeItemInfo called.
- [Thu Jul 13 09:30:00 2017].659364 msPostGISLayerGetItems called.
- [Thu Jul 13 09:30:00 2017].659368 msPostGISParseData called.
- [Thu Jul 13 09:30:00 2017].659378 msPostGISParseData: unique_column=objectid, srid=, geom_column_name=wkb_geometry, table_name=(
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '162823340026') as subquery
- [Thu Jul 13 09:30:00 2017].659384 msPostGISLayerGetItems executing SQL: select * from (
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '162823340026') as subquery where false limit 0
- [Thu Jul 13 09:30:00 2017].666373 msPostGISLayerInitItemInfo called.
- [Thu Jul 13 09:30:00 2017].666385 msPostGISLayerInitItemInfo called.
- [Thu Jul 13 09:30:00 2017].666397 msPostGISLayerIsOpen called.
- [Thu Jul 13 09:30:00 2017].666403 msPostGISLayerWhichShapes called.
- [Thu Jul 13 09:30:00 2017].666406 msPostGISParseData called.
- [Thu Jul 13 09:30:00 2017].666413 msPostGISParseData: unique_column=objectid, srid=, geom_column_name=wkb_geometry, table_name=(
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '162823340026') as subquery
- [Thu Jul 13 09:30:00 2017].666417 msPostGISBuildSQL called.
- [Thu Jul 13 09:30:00 2017].666419 msPostGISBuildSQLItems called.
- [Thu Jul 13 09:30:00 2017].666422 msPostGISBuildSQLItems: 2 items requested.
- [Thu Jul 13 09:30:00 2017].666426 msPostGISBuildSQLFrom called.
- [Thu Jul 13 09:30:00 2017].666429 msPostGISBuildSQLWhere called.
- [Thu Jul 13 09:30:00 2017].666432 msPostGISBuildSQLSRID called.
- [Thu Jul 13 09:30:00 2017].666435 msPostGISBuildSQLSRID: Building find_srid line.
- [Thu Jul 13 09:30:00 2017].666438 msPostGISBuildSQLBox called.
- [Thu Jul 13 09:30:00 2017].666459 msPostGISLayerWhichShapes query: select "objectid","parcelid",encode(ST_AsBinary(ST_Force2D("wkb_geometry"),'NDR'),'hex') as geom,"objectid" from (
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '162823340026') as subquery where wkb_geometry && ST_GeomFromText('POLYGON((573387 162092,573387 162555,574211 162555,574211 162092,573387 162092))',find_srid('','cache.rc_parcel_poly','wkb_geometry')) and ("parcelid"::text = '162823340026')
- [Thu Jul 13 09:30:01 2017].114391 msPostGISLayerWhichShapes query status: PGRES_TUPLES_OK (2)
- [Thu Jul 13 09:30:01 2017].114407 msPostGISLayerWhichShapes got 0 records in result.
- [Thu Jul 13 09:30:01 2017].114412 msPostGISLayerNextShape called.
- [Thu Jul 13 09:30:01 2017].114416 msPostGISLayerFreeItemInfo called.
- [Thu Jul 13 09:30:01 2017].114419 msPostGISLayerClose called: wkb_geometry from (
- select objectid, parcelid, wkb_geometry from cache.rc_parcel_poly where parcelid = '%pin%' or parcelid = '162823340026') as subquery using unique objectid srid=200068
- [Thu Jul 13 09:30:01 2017].114443 msConnPoolRelease(Parcels-Map-Query,host=localhost dbname=postgres user=mapserv password=****,0x191b510)
- [Thu Jul 13 09:30:01 2017].114447 msConnPoolClose(host=localhost dbname=postgres user=mapserv password=****,0x191b510)
- [Thu Jul 13 09:30:01 2017].114546 msQueryByFilter(): Search returned no results. No matching record(s) found.
- [Thu Jul 13 09:30:01 2017].114657 freeLayer(): freeing layer at 0x18e8a40.
- [Thu Jul 13 09:30:01 2017].114661 msPostGISLayerIsOpen called.
- The subquery works fine from sql and returns a single record. One thing I noticed, is that the POLYGON BBOX is way off to the west a few thousand feet. There is no default image size in the Mapfile either so I don’t know where that number is coming from other than shpext . . . are there other parameters that need to be added to the shpext call?
- the TEMPLATE link looks like:
- TEMPLATE 'http://gis.ci.stpaul.mn.us/datasets/PUBLIC/LAND_OWNERSHIP/PARCELS/rc_parcels_assessment.map?pin=162823340026&FORMAT=image%2Fpng&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&LAYERS=all&_OLSALT=0.7873164216111053&SRS=EPSG%3A200068&BBOX=[shpext format="$minx,$miny,$maxx,$maxy"]&WIDTH=1069&HEIGHT=917'
- This will (should) return an image, should it be some sort of text return instead? I’m trying to keep it WMS too . . . is this still doable??
- bobb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement