Cosmetyc_native.Basicinclude module type of Cosmetyc.Basictype node = Cosmetyc.Repr.Raw.nodeA representation for OSM nodes.
val node_id : node -> Cosmetyc.Common.Id.tGet the identifier of a node.
val node_tags : node -> Cosmetyc.Common.Tags.tGet all the tags (key/value) of a node.
val node_position : node -> Cosmetyc.Common.Position.tThe position of a node, in spherical coordinates.
val create_node :
?id:Cosmetyc.Common.Id.t ->
?tags:Cosmetyc.Common.Tags.t ->
Cosmetyc.Common.Position.t ->
nodeSmart constructor for node. If no identifier is provided, a new one will be generated.
type way = Cosmetyc.Repr.Raw.wayA representation for OSM ways.
val way_id : way -> Cosmetyc.Common.Id.tGet the identifier of a way.
val way_tags : way -> Cosmetyc.Common.Tags.tGet all the tags (key/value) of a way.
val create_way :
?id:Cosmetyc.Common.Id.t ->
?tags:Cosmetyc.Common.Tags.t ->
node list ->
waySmart constructor for node. If no identifier is provided, a new one will be generated.
type relation = Cosmetyc.Repr.Raw.relationA representation for OSM relations.
val relation_id : relation -> Cosmetyc.Common.Id.tGet the identifier of a relation.
val relation_tags : relation -> Cosmetyc.Common.Tags.tGet all the tags (key/value) of a relation.
A type to represent objects, of whichever kind.
val relation_members : relation -> (role * object_type) listGet all the members of a relation, as well as their associated role.
val create_relation :
?id:Cosmetyc.Common.Id.t ->
?tags:Cosmetyc.Common.Tags.t ->
(role * object_type) list ->
relationSmart constructor for node. If no identifier is provided, a new one will be generated.
type flux = object_type Stdlib.Seq.tA flux of OSM objects
val read_GeoJson : Stdlib.in_channel -> fluxParse a GeoJson file in a channel. The channel will be closed by the function.
val read_GeoJson_string : string -> fluxParse a string representing the content of a GeoJson file.
val read_OSM_XML : Stdlib.in_channel -> fluxParse an OSM XML file in a channel. The channel will be closed by the function.
val read_OSM_XML_string : string -> fluxParse a string representing the content of an OSM XML file.
val write_OSM_XML : ?indent:bool -> Stdlib.out_channel -> flux -> unitOutput an OSM XML file into an out-channel.
val write_OSM_XML_string : ?indent:bool -> flux -> stringOutput an OSM XML file into a string. The optional argument states whether it should be indented.
val render_png : string -> Cosmetyc.Common.Bbox.Wrap.t -> float -> flux -> unitGiven a file name, a bounding box, and a scale factor (in pixel per meter), outputs the objects into a PNG file.
val render_pdf : string -> Cosmetyc.Common.Bbox.Wrap.t -> float -> flux -> unitGiven a file name, a bounding box, and a scale factor (in pixel per meter), outputs the objects into a PDF file.
val render_svg : string -> Cosmetyc.Common.Bbox.Wrap.t -> float -> flux -> unitGiven a file name, a bounding box, and a scale factor (in pixel per meter), outputs the objects into an SVG file.