[Chameleon] No Query Results for Postgis layer

David Dabney David.Dabney at noaa.gov
Mon Feb 14 09:55:59 EST 2005


Paul,

No worries on your response time.  Do you have any ideas on why 
mapserver/script would not pull back results?  I agree that it must not 
be a Chameleon issue.  Please excuse my ignorance, but what do you mean 
when you say 'check to make sure the loader put attributes into postgis?'

Thanks,

Dave

Paul Spencer wrote:

> David,
>
> this response is terribly late, but perhaps better late than never?  
> We have had no problems using postgis layers and getting query results 
> from them that include all the attributes defined in the SQL of the DATA.
>
> Your layer seems to have all the necessary mapscript pieces (ON, 
> template, tolerance etc).
>
> shape_index, tile_index and layer_index are actually added by 
> Chameleon.  That probably means that none of the attributes are being 
> returned by mapscript to Chameleon.  I will assume that you did check 
> to make sure that the loader put the attributes into postgis :> in 
> which case, I really don't have an answer for you, except that we have 
> managed to get this working.
>
> Cheers
>
> Paul
>
>
> David Dabney wrote:
>
>> I am using Chameleon 2.0 and am trying to query a Postgis layer with 
>> the Query Widget.  For some reason only shape_index, tile_index, and 
>> layer_index are the only features returned.  I used pgsql2shp and the 
>> queries work fine for this layer pointing to the shapefile.  Any help 
>> would be greatly appreciated.
>>
>> Here are my layers:
>>
>> LAYER
>>  NAME stations
>>  METADATA
>>    "wms_title" "Stations Shape"
>>    "wfs_title" "Stations Shape"
>>  END
>>  TYPE POINT
>>  STATUS ON
>>  DATA stations
>>  CLASS
>>            SYMBOL star
>>            COLOR 0 0 0
>>            SIZE 7
>>  END
>>  TEMPLATE "ttt_query.html"
>>  TOLERANCE 10
>>  TOLERANCEUNITS pixels
>>  PROJECTION
>>      "proj=latlong"
>>      "datum=WGS84"
>>  END
>>
>> END # layer
>>
>> LAYER
>>      CONNECTIONTYPE postgis
>>      NAME "luces_stations"
>>      CONNECTION "user=****** dbname=****** host=******** port=5432"
>>      DATA "lat_long from (select * from stations) as s using unique 
>> station_code using SRID=26917"
>>      #FILTER "station = 'Middle'"
>>      METADATA
>>          "wms_title" "Stations PostGIS"
>>          "wfs_title" "Stations PostGIS"
>>      END
>>      STATUS ON
>>      DUMP TRUE
>>      TYPE POINT
>>      PROJECTION
>>          "proj=latlong"
>>          #"init=epsg:4269"
>>          "datum=WGS84"
>>      END
>>      TEMPLATE "ttt"
>>      TOLERANCE 10
>>      TOLERANCEUNITS pixels
>>      LABELITEM "station"
>>      CLASS
>>        TEMPLATE "ttt"
>>        SYMBOL star
>>        COLOR 0 0 0
>>        SIZE 7
>>      END
>> END
>>
>

-- 
~~~~~~~~~~~~~~~~~~~~~~~
David Dabney
NOAA Hollings Marine Lab/JHT
331 Fort Johnson Rd
Charleston, SC 29412
843.762.8984
david.dabney at noaa.gov



More information about the Chameleon mailing list