Skip to main content

Hi, I have downloaded data from WFS (GML) as xml (attached). It shows the location of a parcel. However, I am struggling to read information in FME and create a polygon representing parcel.

I tried to read it as:

OGC GML (Geography Markup Language)

OGC GML SF-0 (Geography Markup Language Simple Features Level SF-0 Profile)

 

I am getting this error

 

XML Parser error: 'Error at file: 'C:\Users\MPODS\AppData\Local\Temp\FME_XSD_CACHE\fmexsd_1729842858321_34548.xml' line: 1 column: 1 message: invalid byte '‰' at position 1 of a 1-byte sequence'
An error occurred while attempting to parse the XML Schema document 'C:\Users\MPODS\AppData\Local\Temp\FME_XSD_CACHE\fmexsd_1729842858321_34548.xml'
The XML Module halted on error, see the logfile for details
An error has occurred. Check the logfile above for details
Failed to obtain any schemas from reader 'GMLSF' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information
FME Session Duration: 0.4 seconds. (CPU: 0.1s user, 0.2s system)
END - ProcessID: 5816, peak process memory usage: 50424 kB, current process memory usage: 49108 kB
Failed to obtain any schemas from reader 'GMLSF' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information
Program Terminating
Translation FAILED.
Workspace generation failed.  Parameter file was C:\Users\MPODS\AppData\Local\Temp\FME_1729843564378_15732.
 

When I try to validate the file using Notepad++ it returns that the schema to be found at https://wms16.epodgik.pl/cgi-bin/PolishCadasterDataIntegration?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=dzialki&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 contains an invalid character.

This is a valid error because when I try and reach that url, it returns an image with the text:

WMS/WFS service not available outside e-mapa.net portals. To use it in your website or software, please contact geo-system@geo-system.com.pl

FME tries to retrieve a part of the schema, and if that schema is not accesible, FME is not able to build the schema.

But as it is XML, you can always use the XMLFragmenter to create features from it.


thanks, I will give it a go 


I managed to create the polygons using GeometryReplaces

Geometry Encoding: OGC Well Known Text

Geometry Source: (POLYGON((@Value(_concatenated))).

Create polygon from string of coordinates

 

However, I need to swap the location of the coordinates in (@Value(_concatenated) (example below) as plots the points using wrong value

695409.989000 654214.600000 (location A on the Map) PLEASE SEE ATTACHMENT

 

This is what I am after

654214.600000 695409.989000  (location B on the Map)

 


One way to do this:

Fragment to FeatureCollection/featureMember with flattening enabled to get the attributes.

Expose the attributes you need.

Fragment to featureMember/dzialki/msGeometry to get the geometry in the fragment.

GeometryReplacer to convert the fragment to geometry.

 


Hi,

 

I think we are trying different approach. Could you please check attached workbench as this is how far I managed to go.


Yes, different ways to solve the same puzzle. But I believe, because this is XML, it should be solved in the way it was ment to be solved. With XML transformers, not stringreplacers. Attached my solution :)

 


thank you for you help. However, attached workbench does not look anything like the picture. I have never worked with XMLFragmenter hence I went for the other solution that is mixing the x with y.


Oops, sorry!


It works perfectly. Thank you very much


It works perfectly. Thank you very much

Cheers!


Reply