Skip to main content
Solved

extract spatial info from XML (ISO19115) to build up feature

  • August 31, 2013
  • 6 replies
  • 37 views

frazucca
Contributor
Forum|alt.badge.img
Hi

 

I've a lot of xml files ISO191115  (like the one at the link below)    with some spatial info as the EX_BoundingPolygon that I need to extract for build up some feature in kml or shape format.

 

Do you have any idea or suggestions?

 

 

 

TIA

 

ciao

 

fz

 

 

link to example file:

 

https://api.echo.nasa.gov/catalog-rest/echo_catalog/granules/G26813121-LPDAAC_ECS.iso19115_2?token=3F8812EE-8A4F-EAFF-FE95-E6A036ACC3C1

Best answer by fmelizard

Hi,

 

 

The geometry replacer (GML encoding) can be placed directly after the reader, and as Takashi mentioned the xml_fragment attribute should be use to convert the geometry.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • September 1, 2013
Hi,

 

 

You can read the XML and use the geometryreplacer to convert the geometry into spatial features.

 

 


frazucca
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • September 2, 2013
Hi,

 

thank.

 

 

I've setup an XML reader, configurated to match  EX_BoundingPolygon, Feature_Paths and flattening enabled. So this return me among the user attribut  the polygon line string.

 

(something like ...<gml:posList>46.211 12.5684 46.0997 13.357 45.5501 13.1555 45.6603 12.3745</gml:posList>...).

 

As you suggest I put down the reader a geometryreplacer trans, but I amid the river flow now.... infact I guess the right geometry encoding I need to choice (GeoRSS? GML?), and again I need something between  reader and transformer?

 

 

TIA

 

ciao

 

fz

takashi
Celebrity
  • September 2, 2013
Hi,

 

 

The GeometryReplacer (GML Encoding) assumes the source attribute is an XML fragment containing a GML element. If you flatten EX_BoundingPolygon element with the XML reader, try specify "xml_flagment" to "Source Geometry Attribute" of the GeometryReplacer.

 

 

Takashi

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • September 2, 2013
Hi,

 

 

The geometry replacer (GML encoding) can be placed directly after the reader, and as Takashi mentioned the xml_fragment attribute should be use to convert the geometry.

frazucca
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • September 2, 2013
Hi

 

great!!  Now it's more clear. Thank.

 

A last question: feeding  xml_fragment to geometry_replacer produce (of course) a line and not a polygon. Do you have idea how get polygon instead?

 

 

again thank

 

 

fz   

takashi
Celebrity
  • September 2, 2013
Hi,

 

 

The coordinate list of the data is not closed (the last coordinate is not equal to the first coordinate), so the GeometryReplacer cannot produce a polygon. But don't worry. You can close the line using the LineCloser transformer :-)

 

 

Takashi