Opened 9 years ago

Closed 9 years ago

#812 closed enhancement (fixed)

topology: xlink prefix customizable

Reported by: aperi2007 Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: topology Version: master
Keywords: Cc:

Description

Hi, in the AsGML() using the xlink sintax actually the prefix is fixed N,E,F. It would be better to have a customizable prefix with an optional string this allow to use even an empty string.

Thx,

Andrea.

Change History (5)

comment:1 Changed 9 years ago by strk

An empty (or otherwise equal) string for all element types would produce invalid GML as each element (Node, Edge, Face) has it's independent identifier.

So, if you xlink:href="1" you don't know if it's Edge, Node or Face with identifier "1".

Beside, we are not referencing faces at all, since ISO faces and GML faces have a different meaning so we don't have an identifier for the GML faces (by all effects being rings rather than surfaces)

comment:2 Changed 9 years ago by aperi2007

So, if you xlink:href="1" you don't know if it's Edge, Node or Face with identifier "1".

The important is the unique property for anchor in the list of GML tags. So if you use the number 1 for node is sufficient don't use it for edge. Instead you know what is it,

because in a directededge in the xlink_href the anchor can be only link an edge. It never could be a node or other. Also an anchor in a directedNode is necessary a node.

Beside, we are not referencing faces at all, since ISO faces and GML faces have a >different meaning so we don't have an identifier for the GML faces (by all effects >being rings rather than surfaces)

However i guess would be better to have an ID even for faces.

Because this allow a more simple identification of a single face in a more complex TopoSurface? (in the GML output). I guess the three component of TopoSurface? and TopoCurve?: Face, Edge and Node would be identificable with an ID unique.

comment:3 Changed 9 years ago by strk

The identifiers we are using are really the identifiers in the db (edge_id, node_id). They are not made up by the AsGML routine.

Would it be ok, for your use case, to prepend the user-defined string to what we have now ? For instance: if you specify "rt-250-" as the prefix, you get: "rt-250-E1" for Edge id 1 and "rt-250-N1" for Node id 1.

comment:4 Changed 9 years ago by aperi2007

The identifiers we are using are really the identifiers in the db (edge_id, node_id). They are not made up by the AsGML routine.

Use the db identifier is really a good choice because this mean that starting with same data and creating the topology the new identifiers will be the same. This is a very important tip (reproducibility).

Would it be ok, for your use case, to prepend the user-defined string to what we have now ? For instance: if you specify "rt-250-" as the prefix, you get: "rt-250-E1" for Edge id 1 and "rt-250-N1" for Node id 1.

Of Course, I guess your proposal is good.

comment:5 Changed 9 years ago by strk

Resolution: fixed
Status: newclosed

r6744 implements custom id prefixes.

Note: See TracTickets for help on using tickets.