ka-map: pgsql layers not rendering tiles [solved]

Dylan Beaudette dylan.beaudette at GMAIL.COM
Tue Jul 11 18:38:20 EDT 2006


Looks like my php_mapscript.so library was from a previous compile, before 
PostGreSQL was included!

Whoops!

Dylan

On Tuesday 11 July 2006 12:45, Dylan Beaudette wrote:
> Greetings,
>
> Having a blast using ka-map and mapserver, but ran into a bit of trouble
> when including a layer from a postgis source.
>
> here is the layer defs from my map file, which work fine in a dbox-style
> mapserver application:
>
> -----------------
> LAYER
> 		NAME "county-boundaries"
> 		TYPE POLYGON
>  		PROJECTION
>  			"+proj=aea +x_0=0.0 +y_0=0 +lon_0=-96 +lat_0=40.0 +lat_1=20 +lat_2=60.0
> +datum=NAD83"
>  		END
> 		DATA "gen_2 from poly_county using unique county_id"
>
>       	CONNECTION "user=xxx password=xxx dbname=tiger2005se host=localhost
> port=5432"
>       	CONNECTIONTYPE postgis
> 		STATUS DEFAULT
> 		TRANSPARENCY ALPHA
> 		STATUS DEFAULT
> 		MINSCALE 24000
> 		LABELMAXSCALE 2037392
> 		LABELITEM "county_name"
> 		CLASS
> 			NAME "County Boundaries"
> 			STYLE
> 				ANTIALIAS TRUE
> 				WIDTH 2
> 				OUTLINECOLOR 1 1 1
> 			END
> 			LABEL
> 				TYPE TRUETYPE
> 				FONT sans
> 				SIZE 13
> 				ANTIALIAS TRUE
> 				COLOR 20 20 220
> 				OUTLINECOLOR 255 255 255
> 				POSITION CC
> 				PARTIALS FALSE
> 				BUFFER 2
> 			END
>
>     	END
>
>  END
>
> ----------------
>
> I read here
> (http://lists.maptools.org/pipermail/ka-map-users/2005-December/000721.html
>) that ka-map will only work with postgis data if the projection string in
> the layer defs matched the SRID of the geometry itself.
>
> noticing that my geometry columns had an incorrect SRID, i changed this
> with the postgis function setsrid() ... however when this layer is enabled,
> ka-map will not generate tiles. also, tile.php returns the following error:
>
> Call to a member function on a non-object in /data1/website/kamap/tile.php
> on line 225
>
> this appears to be where ka-map is either creating or saving the image:
>
>         $szMetaImg =
> $szMetaDir."/t".$metaTop."l".$metaLeft.$szImageExtension; $oImg =
> $oMap->draw();
>         $oImg->saveImage($szMetaImg);
>         $oImg->free();
>
> .... i have a fully functional ka-map application using this same set of
> temp directories, and config files.
>
> does anyone have any ideas on this?
>
> thanks in advance!

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341



More information about the mapserver-users mailing list