Question about GFS files

View: New views
2 Messages — Rating Filter:   Alert me  

Question about GFS files

by Tim Manners :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have been looking into the use of ogr2ogr to load some GML data into a
PostgreSQL database.

I understand that I can edit the GFS files which are created in order to
change how the GML elements are handled (e.g. changing the output width
for a text string).

What I am interested in knowing is how to handle nested elements in the
GML (which currently seem to be ignored).

For example:
The following section of GML defines how a piece of text is rendered in
terms of the anchorPosition, font, height and orientation...

<osgb:textRendering>
<osgb:anchorPosition>3</osgb:anchorPosition>
<osgb:font>1</osgb:font>
<osgb:height>3.000</osgb:height>
<osgb:orientation>0</osgb:orientation>
</osgb:textRendering>

Is it possible to handle a nested element in the <ElementPath> tag of
the GFS file? If so - how is it done?

Additionally, is it possible to bring mathematical functions into the
GFS file? The reason that I ask is because the orientation element is
stored in tenths of a degree - meaning it needs to be divided by 10 to
get the true orientation angle (and it would be good to perform this
function on the data load - as opposed to subsequently in PostgreSQL).

Many thanks in advance.

Tim

This email is only intended for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email which must not be copied, distributed or disclosed to any other person.

Unless stated otherwise, the contents of this email are personal to the writer and do not represent the official view of Ordnance Survey. Nor can any contract be formed on Ordnance Survey's behalf via email. We reserve the right to monitor emails and attachments without prior notice.

Thank you for your cooperation.

Ordnance Survey
Romsey Road
Southampton SO16 4GU
Tel: 08456 050505
http://www.ordnancesurvey.co.uk

_______________________________________________
FWTools mailing list
FWTools@...
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/

Re: Question about GFS files

by Frank Warmerdam-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Tim Manners wrote:

> For example:
> The following section of GML defines how a piece of text is rendered in
> terms of the anchorPosition, font, height and orientation...
>
> <osgb:textRendering>
> <osgb:anchorPosition>3</osgb:anchorPosition>
> <osgb:font>1</osgb:font>
> <osgb:height>3.000</osgb:height>
> <osgb:orientation>0</osgb:orientation>
> </osgb:textRendering>
>
> Is it possible to handle a nested element in the <ElementPath> tag of
> the GFS file? If so - how is it done?

Tim,

I think you would specify the path to the element (relative to the
feature) in the ElementPath element in the GFS file.

     <PropertyDefn>
       <Name>font</Name>
       <ElementPath>osgb:textRendering.osgb:font</ElementPath>
       <Type>String</Type>
     </PropertyDefn>

It is possible that the parser has already stripped off namespaces
at the point these are processed in which case you would need to
do it without the osgb: prefixes.

> Additionally, is it possible to bring mathematical functions into the
> GFS file? The reason that I ask is because the orientation element is
> stored in tenths of a degree - meaning it needs to be divided by 10 to
> get the true orientation angle (and it would be good to perform this
> function on the data load - as opposed to subsequently in PostgreSQL).

No, this is not supported in a .gfs file.  At this point I would normally
consider writing a load script to perform feature transformations during
loading.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
FWTools mailing list
FWTools@...
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/