We probabily need some semples of GML files with input/output templates writen 
for OJ in order to work around
  Peppe

Martin Davis <[EMAIL PROTECTED]> ha scritto:
  RJ, sorry you're having such a frustrating time. I'm sure there's much 
better ways the GML I/O support could have been designed - it was done 
in a hurry, to meet a pretty specific use case. There may also be bugs 
in the codebase, which is possibly what you're running into.

However, until someone has the time & ideas to write something better, 
that's what we're stuck with. :-(

Why don't you post a sample GML file and your template, and maybe 
someone (maybe even me!) will be able to figure out how to get it to work?

Rahkonen Jukka wrote:
> Hi,
>
> I believe I can be classified as a power user of number of commercial and 
> open source GIS software. Though I do not believe I can ever write a working 
> input or output template. I have tried with poor success. But perhaps it is 
> impossible to make it more user friendly?
> The use cases I have had deal with WFS services. Usually it is possible to 
> get a feature type out of a WFS with a browser or wget or something even if 
> the server is somehow badly configured so that the real clients won't parse 
> the GML document. I have been dreaming of storing the bad GML on disk for 
> editing, and then just open the corrected GML directly with OpenJUMP. 
> Unfortunately I haven't been able to make a proper input template so far.
>
> -Jukka Rahkonen-
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: [EMAIL PROTECTED] puolesta: Martin Davis
> Lähetetty: ti 29.1.2008 19:16
> Vastaanottaja: List for discussion of JPP development and use.
> Aihe: Re: [JPP-Devel] Question about GML
> 
> Here's an extract from the JUMP User Guide:
>
> APPENDIX: GML INPUT & OUTPUT TEMPLATES
> To read a general GML file, JUMP makes use of a mapping file called a 
> GML input
> template. This template specifies how the contents of the GML file are 
> mapped to a JUMP
> features. Similarly, when saving a GML file, JUMP uses a GML output 
> template to specify
> the structure of the output GML. The following sections explain how to 
> create GML input and
> output templates.
>
> Note: You don't need to create input or output templates for JUMP GML 
> files. For more
> information, see 4.1 Loading A Layer and 4.2 Saving A Layer.
>
> 12.1 WRITING A GML INPUT TEMPLATE
>
> GML Input Templates are able to extract a single FeatureCollection of 
> features from a GML
> file. Attribute values for each feature can be extracted from the GML 
> describing the feature
> in a variety of ways.
> Listing 12-1 below shows an example of an input template (the column 
> definitions are
> omitted and will be discussed later).
>
> 
> 
> dataFeatures
> Feature
> gml:polygonProperty
> 
> .............
> 
> 
>
> Listing 12-1 - Example of an input template (column definitions omitted)
>
> The input template begins by specifying the GML document's collection 
> element
> (dataFeatures) and the feature element (Feature). This information tells 
> JUMP how to
> identify each feature in the GML document.
> Next, the geometry element and column definitions are given. These 
> specify the spatial
> and non-spatial attributes of each feature. They specify child elements 
> of the feature
> element (e.g. gml:polygonProperty is a child element of Feature).
> If there is more than one kind of geometry element in the file (e.g. 
> Polygons and
> MultiPolygons), you can specify multiple GeometryElement tags. Note 
> however that JUMP
> still assumes that each feature has only one geometry. If a feature is 
> found to have more
> than one geometry, only the last one is read.
> Within the tags are tags, for each of the 
> feature's nonspatial
> attributes. Listing 12-2 below shows an example of a column definition.
>
> 
> Rainfall
> DOUBLE
> 
> 
> 
> Listing 12-2 - Example of a column definition
>
> name is the name that you want the column to have in JUMP.
> type may be STRING, INTEGER, DOUBLE, or DATE. (JUMP can identify and 
> parse a variety
> of date formats, but the recommended format for your data is yyyy-mm-dd).
> value-element tells JUMP how to find the XML element containing the 
> column value. In the
> example, the element is the one named "rainfall". In some cases there 
> may be multiple
> elements with the same name in the GML for a feature. To handle these 
> cases, elements
> may be identified more precisely by providing a combination of the 
> following attributes:
>
> Attribute Value Optional?
> element-name The name of the element N
> attribute-name The name of an attribute on the element Y
> attribute-value The value of the given attribute Y
> value-location tells JUMP how to extract the actual value of the column 
> from the identified
> element. In the example the value is being extracted from the body of 
> the element. The
> template also supports specifying that the value is located as the value 
> of an attribute of the
> element by using the attributeName attribute:
> 
>
> 12.2 WRITING A GML OUTPUT TEMPLATE
>
> Output templates are literally a "template" for the text in the desired 
> output file. They
> consist of constant GML markup, together with symbols which will be 
> replaced by the
> geometry and attribute information in a JUMP feature collection. This 
> allows complete
> flexibility in the GML produced. (In fact, the output does not have to 
> be GML at all,
> although the only Geometry output format currently supported is GML).
> GML output templates have the following structure:
>
> Header Section
> 
> Feature-Definition Section
> 
> Footer Section
>
> Listing 12-3 - Output-template structure
>
> The header and footer sections can contain arbitrary GML markup or data. 
> They will appear
> at the beginning and end of the output GML file. They contain the 
> opening and closing
> markup for the GML file elements as well as any elements which open and 
> close the GML
> FeatureCollection.
> The Feature-Definition Section can contain arbitrary GML markup, as well 
> special output
> template tags. In the output GML the template tags will be replaced by 
> the actual data for
> the geometry and attributes of a JUMP feature collection. The 
> Feature-Definition Section
> will be repeated once for each feature in the JUMP feature collection. 
> The supported output
> template tags are given below.
>
> Table 12-1 - Special output-template tags
>
> TAG DESCRIPTION
> Inserts the value of the attribute named columnname.
> Inserts a GML representation of the geometry.
>
> An example of an output template is given in Listing 12-4 below.
>
> 
> 
> 
> 
> 


> 

> 
> 

> 
> 
> 
> 
> 
> 
> Listing 12-4 - Example of an output template
>
> Note: If you open a GML or FME GML file then save it again in the same 
> format, some
> information may be lost. The Workbench preserves only the information it 
> uses:
> · one spatial attribute for each feature (the "geometry")
> · some non-spatial attributes for each feature (strings, dates and numbers)
> Any information that the Workbench does not use will not be present in 
> the document that
> gets saved. Therefore, you should generally avoid using the Workbench to 
> overwrite
> existing files, unless you are sure that you won't need all of the 
> information in the old file.
>
> Giuseppe Aruta wrote:
> 
>> Some days ago I recived an e-mail from Alice, a studend of Verona who 
>> is studing GML specification. She wanted to know how she can write 
>> template to read/write GML files in OpenJUMP.
>> She also write a letter to OpenJUMP Users List. I post her letter to 
>> the Developer list.
>> If some developers know how and can explain it , this would be a 
>> benefit for everybody . I also have difficult to understand Jump User 
>> manual on how to use GML files.
>> The best, useful answer willl be used as wiki page on OJ documentation
>> Best Regards
>> Peppe
>> _____________________________
>> Hi, my name is Alice Falchi and I'm an italian student in informatics 
>> at University of Verona (Italy). I'm doing an analysis of available 
>> softwares to visualization GML file.
>> One of these is exactly Jump.
>> By my research I realized that now the GML standard isn't well defined 
>> yet. Infact I'm not able to run any GML files.
>> Please, can you help me to understand how to build correctly GML 
>> files? Which features with? And finally, how I create "input template"?
>> Thanks!
>>
>> ------------------------------------------------------------------------
>> ------------------------------------------------------------------------
>> L'email della prossima generazione? Puoi averla con la nuova Yahoo! 
>> Mail 
>> 
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> 
>
> 

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


       
---------------------------------

---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to