[mapserver-users] Create a file "GML" from a layer of type"annotation".

José María Michia jose.maria.michia at gmail.com
Fri Nov 21 23:38:15 EST 2008


2008/11/21 Pietro Giannini <pgiannini at bytewise.it>:
> If I understood, you want to use mapserver as a label-generator, because
> the algorithm used satisfy you, but IMHO there is no method to extract the
> labels generated from mapserver, also using mapscript.

Yes Pietro, exactly.

> In your place, I would use directly a desktop GIS, whatever you want, to
> generate labels directly from layer source.
> Try UDig (udig.refractions.net) as free GIS, it has a non-collision
> algorithm for objects labels.

I tried UDig. I like the labels. However, I have not found a way to
export the labels out of uDig (generalized to a certain scale). And
what I wish, finally, is to use the results of labeling in GMT.

> another way?
> a ready-to-use library for cartographic label placement under free
> software license -> http://geosysin.iict.ch/trac/wiki/Index4extJPAL


interesting. I'm going to try this. I knew it existed, but I did not
know that PAL was ready to use.
I hope to be ready to use me too.

I downloaded libpal, and the file "COPYING" said it was "GPL".

If I can use PAL, I think that is a very good alternative.

Thanks Pietro
José María

> ciao
> .............................. pg
>
>
> On Ven, Novembre 21, 2008 07:27, José María Michia wrote:
>> 2008/11/21 Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>:
>>> Hi,
>>>
>>> I guess that annotation layers are not supported for this use and you
>>> should somehow create a point type layer that acts like the annotation
>>> layer. There needs only be two colums in the schema, geometry and name.
>>> I don't know it could be done, but have you tried just to change the
>>> layer type to point?
>>
>> You are right. The server "WFS" does not support ANNOTATION layers.
>>
>> I have not tried to change the type of geometry of the layer to point.
>>
>> However, the geometry type of data is polygon, so I can easily convert
>> to centroids.
>>
>> The test that I've done it, is to change the type of geometry of the
>> layer to the type polygon, instead of annotation. In this way, I've
>> moved closer to the goal. But the GML file that I have been able to
>> obtain, is the product of a "REQUEST = GetFeature". Because of this,
>> the result contains all elements, not only those items with
>> generalized labels by MapServer.
>>
>> I think that some scripting can be used to read de labels cache, and
>> write the data in a convenient way. I still have not been able to
>> explore this alternative.
>>
>>> -Jukka Rahkonen-
>>
>> Thanks Jukka!
>>
>>>
>>>
>>> -----Alkuperäinen viesti-----
>>> Lähettäjä: mapserver-users-bounces at lists.osgeo.org puolesta: José María
>>> Michia
>>> Lähetetty: pe 21.11.2008 5:51
>>> Vastaanottaja: Pietro Giannini
>>> Kopio: mapserver-users at lists.osgeo.org
>>> Aihe: Re: [mapserver-users] Create a file "GML" from a layer of
>>> type"annotation".
>>>
>>> Hi,
>>>
>>> Maybe is useful explain more precisely my goal.
>>>
>>> The attached image is a PNG obtained by using shp2img. The layer
>>> displayed is an ANNOTATION LAYER. The labels are generalized by
>>> MapServer. I wish to get the labels displayed in this extent, in this
>>> scale, with this degree of generalization, in a GIS format, like GML,
>>> or ShapeFile. I wish to use these file in GMT, that no have
>>> implemented labeling algorithm.
>>>
>>> My attempts:
>>>
>>> 1. shp2img: i obtained PDF files, which can be integrated in the final
>>> map using something like Inkscape.
>>> 2. WMS: only can obtain a raster image.
>>> 3. WFS: I have been able to generate GML files using an WFS request,of
>>> type GetFeature. However, GetFeature work on all elements, without
>>> caring for the widespread labeling. I do not want all the labels, only
>>> those that have been generalized to a certain scale.
>>>
>>> In the past, I used MapScript. If I remember correctly, I could do
>>> this by using a script in PHP or Python. Correct?
>>>
>>> Thanks for any advice.
>>> José María
>>>
>>>
>>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list