Data Binding and Parser for cityGML

classic Classic list List threaded Threaded
4 messages Options
Lvw
Reply | Threaded
Open this post in threaded view
|

Data Binding and Parser for cityGML

Lvw
Hey list,

I would like to define processes that takes cityGML (application schema of gml) datasets as (complex data) input, process the data and send back some xml based report about the input. But I am quite lost at the data binding / parsing / generator stuff that's part of this implementation. I was thinking about using citygml4j to parse the data but I have no idea how I can define a data binding for this. According to this:

https://wiki.52north.org/bin/view/Geoprocessing/CreateNewDataBinding

and

https://wiki.52north.org/bin/view/Geoprocessing/CreateNewParser

Would it be possible to *not bind anything* to the data inputs but parse the data manually during the execution of the process (so in the run() method)?

Best,
Lucas
Reply | Threaded
Open this post in threaded view
|

Re: Data Binding and Parser for cityGML

BenjaminPross
Hi Lucas,

You don't have to go all the way and create a binding/parser/generator
for citygml (although it would be great if you did and would contribute
it back :))
However, for your task you could use the
GenericXMLDataBinding/-Parser/-Generator.
You will have to specify the parser/generator for the respective
in/-output in your process.
If you will be using the AbstractAnnotatedAlgorithm, your process could
look like this:

     ...

     private XmlObject result;
     private XmlObject data;

     @ComplexDataOutput(identifier = "result", binding =
GenericXMLDataBinding.class)
     public XmlObject getResult() {
         return result;
     }

     @ComplexDataInput(identifier = "data", binding =
GenericXMLDataBinding.class)
     public void setData(XmlObject data) {
         this.data = data;
     }

     @Execute
     public void runAlgorithm() {
     ...


There are other tutorials in case you want to use another Algorithm
superclass.
In the run method you could then use the citygml4j API to parse the
XMLObject.
The in/-output will support the mime type text/xml and this will be what
you need to specify in the execute request later.
You could also specify a new mimetype/schema combination. Let us know,
if you need to know how to do this.

Hope this helps.

Cheers,

Benjamin

Am 27.10.2014 14:03, schrieb Lvw:

> Hey list,
>
> I would like to define processes that takes cityGML (application schema of
> gml) datasets as (complex data) input, process the data and send back some
> xml based report about the input. But I am quite lost at the data binding /
> parsing / generator stuff that's part of this implementation. I was thinking
> about using citygml4j to parse the data but I have no idea how I can define
> a data binding for this. According to this:
>
> https://wiki.52north.org/bin/view/Geoprocessing/CreateNewDataBinding
>
> and
>
> https://wiki.52north.org/bin/view/Geoprocessing/CreateNewParser
>
> Would it be possible to *not bind anything* to the data inputs but parse the
> data manually during the execution of the process (so in the run() method)?
>
> Best,
> Lucas
>
>
>
> --
> View this message in context: http://geoprocessing.forum.52north.org/Data-Binding-and-Parser-for-cityGML-tp4025866.html
> Sent from the 52° North - Geoprocessing Community Forum mailing list archive at Nabble.com.
> _______________________________________________
> Geoprocessingservices mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/geoprocessingservices
> http://geoprocessing.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines


--
Benjamin Proß
Software Engineer
52°North Geoprocessing Community

52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
Fon: +49-(0)-251–396371-42
Fax: +49-(0)-251–396371-11
[hidden email]
http://52north.org/

General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849

_______________________________________________
Geoprocessingservices mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geoprocessingservices
http://geoprocessing.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Lvw
Reply | Threaded
Open this post in threaded view
|

Re: Data Binding and Parser for cityGML

Lvw
Hi Benjamin,

Thank you very much for your quick reply. I was already thinking along the lines you set out but thank you very much for clearing it fully up!

I agree that it would be cool to have this binding/parser/generator thing for cityGML but the problem is that some cityGML datasets can become very large (multiple gbs), so a *normal* parsing of such a file is problematic due to main memory shortage. CityGML4j solves this by being able to parse top level features one by one. I think its therefore incompatible with the binding/parser/generator stuff.

Thanks again and if you have some ideas about how this could be implemented I would love to hear about it.

Cheers,
Lucas
Reply | Threaded
Open this post in threaded view
|

Re: Data Binding and Parser for cityGML

BenjaminPross
Another possible solution could be the GenericFileDataBinding, I guess. The data would be downloaded and saved to a file, which you could then parse with the citygml API. Besides that, I was working on streaming-based parsing some time ago. That never made it beyond a prototypical stage, but I will have another look at it and report.

Cheers,

Benjamin