Joining sql server table to shp files

Budi Hermansyah boedy1996 at GMAIL.COM
Tue Aug 21 19:25:20 PDT 2007


i try to join shp file with table in sql server to get data aggregate from
sql server. How ? please correcting this script. Thks.
mapfile :
	 LAYER
	    NAME "kabupaten1"
		DATA "Kab_Point_point.shp"
          JOIN
            NAME "test"
            CONNECTIONTYPE ogr
            CONNECTION    "<OGRVRTDataSource>
                           <OGRVRTLayer name='POW'>
                           <SrcDataSource>ODBC:id/pwd at mydata</SrcDataSource>

                           <SrcSQL>select * from vrekonstruksi</SrcSQL>
	
#<SrcLayer>vrekonstruksi</SrcLayer> 
                           #<GeometryType>wkbPoint</GeometryType> 
                           #<LayerSRS>WGS84</LayerSRS>
                           #<GeometryField encoding='PointFromColumns'
x='Longitude' y='Latitude'/> 
                           </OGRVRTLayer>
                           </OGRVRTDataSource>"
            TABLE "vrekonstruksi"
            FROM "KODE_KAB"
            TO "KODELOKASI"
            TYPE ONE-TO-ONE
           END
		
		STATUS DEFAULT
		TYPE POINT
		LABELITEM 'KODE_KAB'
		CLASS
		   SYMBOL 7
		   SIZE 5
		   COLOR 255 0 0 		   		
		   LABEL 
		      #FONT arial
			  TYPE BITMAP
			  SIZE LARGE
			  POSITION AUTO
			  PARTIALS FALSE
			  OUTLINECOLOR 255 255 255
			  COLOR 0 0 255
		   END
		   TEMPLATE "QueryViewMap.html"
		   #COLOR 255 200 100
		   OUTLINECOLOR 0 0 0 
		END		
END	



More information about the MapServer-users mailing list