Hello,

The X,Y you have can be directly used to display the names you want to but
they will be horizontal.

The point is that mapnik uses one geometry column for each layer.
So either you can specify the geometry column in the config (it is possible
with database as data source I think) and uses the same data source for two
layers or you extract all those points + label in a new data source.
You would have then 2 data source 
- One with your polygons, to draw your polygons
- one with your XY points and labels to draw your labels horizontally

If you want to go one step further instead of doing a data source of points,
you make a data source of lines.
With the X,Y you have and the angle, you compute two points and make a
linestring out of it.
(E.g : If I give you the center of a square and an angle of 45° you can
create a line that actually is the diagonal of this square)
You would finally have 2 data sources :
- one with your polygon (like before)
- one with linestrings + labels to draw your labels.

Indeed both cases may require post-processing if you have to split your data
sources into two.

Nicolas

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Lunieme
Sent: Thursday, July 29, 2010 3:43 PM
To: [email protected]
Subject: Re: [Mapnik-users] Problem rendering french cadastre : text /
symbol placement


Thanks for your answer Nicolas.
Yes As far as I understand the solution you propose is actually a loooot of
work :)
As my X, Y attributes are stored in a polygon layer (parcels) i have to
build first a point layer from my X, Y attributes ? And a another  line
layer for angles.

In fact i would really like to minimize post-processing on the original
database :(

I see also that dx & dy parameters seem to be expressed in pixels ? I also
need to convert X,Y from map coordinates to pixels ? I won't be able to do
this operation with a simple XML config file?  right ?
 
Ludovic


Nicolas Gillet wrote:
> 
> Hello Ludovic.
> 
> TextSymbolizer can place a label pretty much everywhere from a point using
> the dx and dy parameters but indeed there is no angle parameter.
> 
> But if you really need such feature, you could create a new datasource
> from
> the one you have.
> With a point and an angle and a little bit of math you can create 2 points
> and make a linestring out of it. Then displaying your label on this
> linestring will give you the result you're searching.
> 
> This is probably a lot of work, but I don't have any better solution for
> now.
> 
> Nicolas  
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Lunieme
> Sent: Thursday, July 29, 2010 10:40 AM
> To: [email protected]
> Subject: [Mapnik-users] Problem rendering french cadastre : text / symbol
> placement
> 
> 
> Hi List,
> I'm looking for a way to render french cadastre (the national land
> registry
> with all parcels, streets, roads, names, building feet...) with Mapnik.
> 
> We are actually using Mapguide OS as rendering system but i'm convinced
> Mapnik could bring us many benefits even if the job is quite heavy.
> 
> I am now facing 2 problems with labels and points placement:
> 
> Each label placement is defined in national database as fields : X, Y
> position given in maps units and ANGLE given in degrees.
> 
> In the same way point placement is also defined with ANGLE field.
> 
> TextSymbolizer and PointSymbolizer do not seem to have a POSITION and
> ANGLE
> option. 
> Is there a solution? Would these options will be added in the near future.
> It could be a great improvement.
> 
> Ludovic
> 
> http://old.nabble.com/file/p29294250/17_7.png 
> -- 
> View this message in context:
>
http://old.nabble.com/Problem-rendering-french-cadastre-%3A-text---symbol-pl
> acement-tp29294250p29294250.html
> Sent from the Mapnik - Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
> 
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
> 
> 

-- 
View this message in context:
http://old.nabble.com/Problem-rendering-french-cadastre-%3A-text---symbol-pl
acement-tp29294250p29296541.html
Sent from the Mapnik - Users mailing list archive at Nabble.com.

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to