[maplab-users] ODBC -OGR Connection - OVF file- MapLab

Jeff McKenna jmckenna at dmsolutions.ca
Wed Dec 15 09:51:53 EST 2004


ok so what are the exact errors when using this modified mapfile?

jeff




Aldo Tocchio wrote:
> Thanks jeff for your reply.
> 
> 
> So I have the following configure:
> 
> Project:
> C:\ms4w\apps\maplab-2.2\SIT_BIELLA in this folder there are the 
> following subfolders:
> -data (with ovf file: Tbl_maplab.ovf)
> -image
> -etc
> and the map file: "SIT-BIELLA"
> 
> the map file   is:
>      MAP
>  NAME "SIT-BIELLA"
>  STATUS ON
>  EXTENT 402022.59625 5025297.5 458531.3725 5067615.5
>  SIZE 400 300
>  SHAPEPATH "./data"
>  SYMBOLSET "./etc/symbols.sym"
>  FONTSET "./etc/fonts.txt"
>  IMAGETYPE png
>  IMAGECOLOR 255 255 255
>  UNITS METERS
>  WEB
>    MINSCALE 100
>    MAXSCALE 400000
>    IMAGEPATH "/ms4w/tmp/ms_tmp/"
>    IMAGEURL "/ms_tmp/"
>  END
>  QUERYMAP
>    STATUS OFF
>    SIZE -1 -1
>    COLOR 255 255 0
>    STYLE HILITE
>  END
>  LEGEND
>    STATUS OFF
>    IMAGECOLOR 255 255 255
>    POSITION LL
>    KEYSIZE 20 10
>    KEYSPACING 5 5
>    TEMPLATE 
> "C:/ms4w/apps/maplab-2.2/htdocs/mapbrowser/legend_template.html"
>    LABEL
>      TYPE BITMAP
>      SIZE MEDIUM
>      OFFSET 0 0
>      BUFFER 0
>      MINDISTANCE -1
>      MINFEATURESIZE -1
>      COLOR 0 0 0
>      PARTIALS TRUE
>      FORCE FALSE
>    END
>  END
>  SCALEBAR
>    STATUS OFF
>    COLOR 0 0 0
>    IMAGECOLOR 255 255 255
>    UNITS MILES
>    INTERVALS 4
>    SIZE 200 3
>    STYLE 0
>    POSITION LL
>    LABEL
>      TYPE BITMAP
>      SIZE MEDIUM
>      OFFSET 0 0
>      BUFFER 0
>      MINDISTANCE -1
>      MINFEATURESIZE -1
>      COLOR 0 0 0
>      PARTIALS TRUE
>      FORCE FALSE
>    END
>  END
>  SYMBOL
>    NAME "png"
>    TYPE ELLIPSE
>    FILLED TRUE
>    POINTS
>       1 1
>    END
>  END
>  OUTPUTFORMAT
>    NAME "png"
>    MIMETYPE "image/png"
>    DRIVER "GD/PNG"
>    EXTENSION "png"
>    IMAGEMODE PC256
>    TRANSPARENT FALSE
>  END
>  LAYER
>    NAME "Tbl_maplab"
>    STATUS ON
>    DATA "Tbl_maplab"
>    TYPE POINT
>    CONNECTIONTYPE OGR
>    CONNECTION "Tbl_maplab.ovf"
>    UNITS METERS
>    SIZEUNITS PIXELS
>    TOLERANCE 0
>    TOLERANCEUNITS PIXELS
>    CLASS
>      STYLE
>        SYMBOL "star"
>        COLOR 88 0 0
>        SIZE 12
>        MINSIZE 10
>        MAXSIZE 100
>      END
>    END
>  END
> END
> 
> the ovf file Tbl_maplab.ovf is following:
> <OGRVRTDataSource>
>    <OGRVRTLayer name="Tbl_maplab">
>        <SrcDataSource>ODBC:MapLab_AV</SrcDataSource>
>    <SrcLayer>Tbl_maplab</SrcLayer>
>    <GeometryType>wkbPoint</GeometryType>
>    <GeometryField encoding="PointFromColumns" x="x" y="y"/>
>    </OGRVRTLayer>
> </OGRVRTDataSource>
> 
> I have created a System DSN "MapLab_AV" linked to Database_arcview.mdb 
> with a table: "Tbl_maplab"
> This table have the following fields:
> -AutoNumber     contator
> -Denominazione text
> -x                     number
> -y                     number
> 
> with ogrinfo.exe I have the following msg:
> ERROR 4: Update access not supported for VRT datasources.
> Had to open data source read-only.
> INFO: Open of 'Tbl_maplab.ovf'
> using driver `VRT' successful.
> 1: Tbl_maplab (Point)
> 
> with "orginfo Tbl_maplab.ovf Tbl_maplab" command I have the msg:
> 
> 
> 
> C:\ms4w\apps\maplab-2.2\SIT_BIELLA\data>ogrinfo tbl_maplab.ovf Tbl_maplab
> ERROR 4: Update access not supported for VRT datasources.
> Had to open data source read-only.
> INFO: Open of `tbl_maplab.ovf'
> using driver `VRT' successful.
> 
> Layer name: Tbl_maplab
> Geometry: Point
> Feature Count: 9
> Extent: (422136.000000, 5024175.000000) - (434292.000000, 5042143.000000)
> Layer SRS WKT:
> (unknown)
> AutoNumber: Integer (10.0)
> Denominazione: String (50.0)
> x: Integer (10.0)
> y: Integer (10.0)
> OGRFeature(Tbl_maplab):0
>  AutoNumber (Integer) = 7
>  Denominazione (String) = PII21 Mongrando
>  x (Integer) = 422136
>  y (Integer) = 5042143
>  POINT (422136.000 5042143.000 0.000)
> ...
> ...
> OGRFeature(Tbl_maplab):8
>  AutoNumber (Integer) = 12
>  Denominazione (String) = Piana & Raspo
>  x (Integer) = 433260
>  y (Integer) = 5025465
>  POINT (433260.000 5025465.000 0.000)
> 
> 
> 
> 
> 
> Thanks so mach for your important help!!!!
> 
> 
> Aldo Tocchio
> Geologo
> A.R.P.A. Piemonte
> Dipartimento Biella
> via Trento, 11
> 13900 Biella (BI)
> tel. 015-35813145 - fax 015-35813181
> email: a.tocchio at arpa.piemonte.it
> 
> _______________________________________________
> Maplab-users mailing list
> Maplab-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/maplab-users
> 




More information about the Maplab-users mailing list