[FWTools] Using a non-standard projection in ogr2ogr

Simon O'Keefe simon.okeefe at groundtruth.com.au
Tue Mar 2 19:29:18 EST 2010


Hi Richard,

Thanks for the info. It helped me track down what information I
needed. I also realise now that I was trying to solve two problems at
once - specifying a custom projection, and generating points from
coordinates in an aspatial table. A colleague helped me come up with a
VRT file that did the trick:

<OGRVRTDataSource>
    <OGRVRTLayer name="accident">
        <SrcDataSource>ACCIDENT.CSV</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>
  PROJCS["AGD66 / AMG zone 54.5",
    GEOGCS["AGD66",
        DATUM["Australian_Geodetic_Datum_1966",
            SPHEROID["Australian National Spheroid",6378160,298.25,
                AUTHORITY["EPSG","7003"]],
            AUTHORITY["EPSG","6202"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.01745329251994328,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4202"]],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",145],
    PARAMETER["scale_factor",1.0],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    AUTHORITY["EPSG","20255"],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH]]
        </LayerSRS>
        <GeometryField encoding="PointFromColumns" x="AMG_X" y="AMG_Y"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

Thanks again for your input.

Cheers,

Simon
_______________________________________
Simon O'Keefe
Geospatial Systems Developer
Groundtruth Mapping Systems
Level 2, 140 Queen Street
Melbourne VIC 3000 Australia
phone:  +61 409 413 890
email:  simon.okeefe at groundtruth.com.au
web:    http://www.groundtruth.com.au
_______________________________________



On 2 March 2010 00:01, Richard Greenwood <richard.greenwood at gmail.com> wrote:
> On Mon, Mar 1, 2010 at 2:54 AM, Simon O'Keefe
> <simon.okeefe at groundtruth.com.au> wrote:
>> Hi,
>>
>> I'm having difficulty in finding an example to follow to process a
>> dataset I've come across which has a custom projection.
>>
>> I would like to convert a text file into a shape file. The text file
>> has two columns called AMG_X and AMG_Y. I know that the coordinates
>> supplied in these fields are not a standard projection (so I don't
>> have an EPSG number), but have the followng parameters:
>>
>>    PARAMETER["latitude_of_origin",0],
>>    PARAMETER["central_meridian",145],
>>    PARAMETER["scale_factor",0.9996],
>>    PARAMETER["false_easting",500000],
>>    PARAMETER["false_northing",10000000],
>>
>> Can someone please point me to an example that will allow me to
>> specify individual parameters in an ogr2ogr command.
>>
>> Thanks,
>>
>> Simon
>
> You are missing a few bits of information, specifically the projection
> and datum, but the parameters suggest that it might be a Transverse
> Mercator projection. So try this and see if your data ends up in the
> right place.
>
> +proj=tmerc +lat_0=0 +lon_0=145 +k=0.9996 +x_0=500000 +y_0=10000000
> +ellps=GRS80  +units=m
>
> Regards,
> --
> Richard Greenwood
> richard.greenwood at gmail.com
> www.greenwoodmap.com
>


More information about the FWTools mailing list