[mapserver-users] theme on the fly with mapserver

2008-11-20 Thread Giuseppe Campagna
Hi, 
i'm new in the list and i'm starting to use MapServer

I created a web-client to see wms services, query and legend, using geotools.
I would now like to create dynamic themes (theme on the fly). 
It's possible? how can you do with geotools?


peppe


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] theme on the fly with mapserver

2008-11-20 Thread bartvde
Hi,

have a look at Styled Layer Descriptor (SLD).

http://mapserver.gis.umn.edu/docs/howto/sldhowto

and on the Geotools side:

http://docs.codehaus.org/display/GEOTDOC/06+Style+Layer+Descriptor+Document

Best regards,
Bart

 Hi,
 i'm new in the list and i'm starting to use MapServer
 I created a web-client to see wms services, query and legend, using
 geotools.
 I would now like to create dynamic themes (theme on the fly).
 It's possible? how can you do with geotools?

 peppe


 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2008-11-20 Thread José María Michia
Hi,

I want to create a data file, in GML, starting with a layer of type
annotation generated by MapServer as WFS.

I've only been able to create the file GML using LAYER- TYPE = POLYGON.
This does not serve me, because it includes all the elements of the layer. I
want a layer that contains only the items that MapServer decided that
should be labeled.

The goal is to use data from the labels in other programs. So, other GIS
formats can be fine.

Thanks for any advice.
José María
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2008-11-20 Thread Pietro Giannini
Ciao José.

You can get the WFS layer in a free desktop GIS, like QGis (qgis.org) via
a default plugin which must be activated, and then export in shapefile.

If you need GML use ogr2ogr; qgis also has a converter plugin, but I never
used - be careful to GML version...

Hope this help

ciao
  pg


-- 
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58N 12°29'13.39E



On Gio, Novembre 20, 2008 14:30, José María Michia wrote:
 Hi,

 I want to create a data file, in GML, starting with a layer of type
 annotation generated by MapServer as WFS.

 I've only been able to create the file GML using LAYER- TYPE = POLYGON.
 This does not serve me, because it includes all the elements of the layer.
 I
 want a layer that contains only the items that MapServer decided that
 should be labeled.

 The goal is to use data from the labels in other programs. So, other GIS
 formats can be fine.

 Thanks for any advice.
 José María
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-20 Thread thomas bonfort
hi,
yes this is the behavior that's used (with agg, but gd also): the
label text is split in individual characters, and each one is rendered
individually with a specific position and angle, and therefore the
joining between characters is lost (this isn't specific to the
outlining case, as can be seen on jackey's no_outline example).

Unfortunately, there's no simple fix, and even if so this would
require rewriting the entire angle follow code. This would require
that the text be rendered in one pass, following a smoothed curve that
fits the line geometry. AGG can sort of do this (see the trans_curve
examples in your agg source dir or on the website
http://antigrain.com/demo/index.html), but the characters are
deformed. It's an option that I have tested locally but gave up with
seeing the quality of the results.

does anyone have experience with pango and know if it could solve this problem ?

cheers,
thomas



On Tue, Nov 18, 2008 at 21:50, TC Haddad [EMAIL PROTECTED] wrote:
 on re-reading Steve W's point #2 - perhaps the specific bug is that
 there is a difference with when in the sequence of drawing,
 OUTLINECOLOR is applied

 i) when ANGLE is AUTO, OUTLINECOLOR is applied after the whole label is drawn

 ii) when ANGLE is FOLLOW, OUTLINECOLOR is applied after each letter is drawn

 so this ends up making a joined Arabic label look fractured if both
 OUTLINECOLOR and ANGLE FOLLOW are used at the same time.

 TH

 On Tue, Nov 18, 2008 at 12:32 PM, TC Haddad [EMAIL PROTECTED] wrote:
 Jackey,

 I can read Arabic, and from the most recent attachments you sent I
 think the labels are printing fine. That is,  I do see the problem you
 are referring to, but the cause is not the font (the joined letters
 are as they should be).

 The real problem that I see is the fact that you are using
 OUTLINECOLOR. This is putting a 1 pixel white outline on *each*
 letter.

 This approach works in English and languages where the letters don't
 attach in printed form. But in Arabic, where whole worlds are joined,
 the outline should be applied at the level of the word, not at the
 level of the letter.

 As far as I know this feature does not exist in Mapserver at the
 moment, so it would have to be requested.

 Tanya



 On Tue, Nov 18, 2008 at 12:14 PM, Stephen Woodbridge
 [EMAIL PROTECTED] wrote:
 Jackey,

 I'm not sure how much more I can help other than to say:

 1) make sure you are building with fribidi2 version 0.19.1+
 2) Since character are generated individually on rotated labels, there may
 be an issue. Thomas Bonfort would be the person that implemented the AGG.
 You should probably try doing this with the AGG driver if you have not tried
 that yet. That is what I'm using.
 3) try to locate a better/different font that supports Arabic

 -Steve

 Jackey Cheung wrote:

 Steve,

 Thanks for the advise, but we've tried the Arial font already in the first
 test, it's just the same. We thought it was the fribidi2's problem since
 0.19.1 doesn't have their configure script changed, and tried the 0.10.9,
 but it's all the same, every word is broken.


 On Mon, Nov 17, 2008 at 11:15 PM, Stephen Woodbridge
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

Jackey,

Try locating a different font. if the text is being rendered as
glyphs and they look correct, but is missing the joining
information, it is likely that the font you are using does not
include the joining glyphs.

If you are using a windows machine, try getting mapserver via the
fonts.txt file to point to the arial.ttf in the fonts folder. And
change you FONT ... to select the windows arial font. This assumes
that you can display arabic text correctly using the arial font from
a windows application like excel.

-Steve W.

Jackey Cheung wrote:

Greetings!


We've build the MapServer 5.2 on a Linux server, with fribidi2
0.19.1, to
try show Arabic labels. But the words has been broken down to
characters in
the generated images (line.png). Then we've tried on a MS4W
2.3.0 server,
but the images (ms4w.png) are even worse.

We are using PostGIS, and the database is using UTF8 (pgpr.png),
while all
Arabic data can be shown correctly (pg.png) on my English
Windows XP, and

we've tried some more machines, or on IE, to make sure that
Arabic text in
database are really UTF8.

Here's the images: http://www3.mapasia.com/jackout/ara.png


The part of the map file is as follow, where the arbic-trans
is a Arabic
TrueType font named Arabic Transparent:
LABEL
ANGLE FOLLOW
PRIORITY [priority]
ENCODING UTF-8
COLOR 0 0 0
OUTLINECOLOR 255 255 255
TYPE TRUETYPE
FONT arbic-trans
SIZE 7
POSITION AUTO
PARTIALS FALSE
MINDISTANCE 500
BUFFER 1
MINFEATURESIZE 50
END


[mapserver-users] UTF-8 + SDE + GetfeatureInfo

2008-11-20 Thread Chris Whitteker

Hey everyone,

We're having a bit of a problem performing getfeatureinfo queries with 
mapserver.  The french characters are coming out of the database as ISO-8859-1 
instead of UTF-8.  The database and servers are configured as UTF 8, the map 
files and the query templates too.  Actually text/plain also has problems so 
it's not the templates.  We're trying to encode everything as UTF 8 so me 
specificying ISO-8859-1 in the meta tag of the html query template doesn't work.
GetFeatureInfo results:

Layer 'SoilOrder'
  Feature 10894: 
OBJECTID = '10894'
SLC_SOIL_ORDER_V31_22_ID = '81600931'
SOIL_ORDER_NAME_EN = 'Chernozemic'
SOIL_ORDER_NAME_FR = 'Chernoz�mique' - error is here in my browser.
SOIL_ORDER_PCNT = '84'
SHAPE = 'shape'
Any idea if there are outstanding problems here with SDE and mapserver not 
playing nice with this?  We're beating our heads against the wall thinking 
about what config we could have missed.

Oh - labels with french are fine, and so are legends; it's only the 
getfeatureinfo queries that have troubles.

Cheers,

Chris Whitteker

_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] php mapscript objects in session?

2008-11-20 Thread Christopher Condit
Hi-
I'm using ms4w 2.2.7 and I've run into a problem. Ideally I'd like to
create the MapScript map object and store it in the session:

$_SESSION['map'] = ms_newMapObj($getMapPath);

This works fine for the that page, for the first call, but when I
attempt to reference it later I get a PHP error:
Fatal error: Object has an invalid _handle_ property 

Am I missing something here?

Thanks,
-Chris

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2008-11-20 Thread José María Michia
2008/11/20 Pietro Giannini [EMAIL PROTECTED]

 Ciao José.

 You can get the WFS layer in a free desktop GIS, like QGis (qgis.org) via
 a default plugin which must be activated, and then export in shapefile.

The problem is that WFS works only for layer of type polygon, and
not for layer of type annotation. The need to use an annotation layer,
is because i wish to get labels generalized.

Through the use of WMS I've been able in QGIS to show the annotation
layer. But QGIS not allow me to select elements, so that I can not
export them.

 If you need GML use ogr2ogr; qgis also has a converter plugin, but I never
 used - be careful to GML version...

Yes, I use ogr2ogr to convert the GML files to GMT format. But, until
now, i can not obtain the GML that i hope.

 Hope this help

 ciao
   pg


 --
 Pietro Giannini
 Bytewise srl - Area GIS
 41°50'38.58N 12°29'13.39E

Thanks for your help Pietro

José María

 On Gio, Novembre 20, 2008 14:30, José María Michia wrote:
  Hi,
 
  I want to create a data file, in GML, starting with a layer of type
  annotation generated by MapServer as WFS.
 
  I've only been able to create the file GML using LAYER- TYPE = POLYGON.
  This does not serve me, because it includes all the elements of the layer.
  I
  want a layer that contains only the items that MapServer decided that
  should be labeled.
 
  The goal is to use data from the labels in other programs. So, other GIS
  formats can be fine.
 
  Thanks for any advice.
  José María
  ___
  mapserver-users mailing list
  mapserver-users@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapserver-users
 

 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2008-11-20 Thread José María Michia
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
attachment: labels.png___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Create a file GML from a layer of typeannotation.

2008-11-20 Thread Rahkonen Jukka
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?

-Jukka Rahkonen-


-Alkuperäinen viesti-
Lähettäjä: [EMAIL PROTECTED] puolesta: José María Michia
Lähetetty: pe 21.11.2008 5:51
Vastaanottaja: Pietro Giannini
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Create a file GML from a layer of 
typeannotation.
 
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Create a file GML from a layer of typeannotation.

2008-11-20 Thread José María Michia
2008/11/21 Rahkonen Jukka [EMAIL PROTECTED]:
 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ä: [EMAIL PROTECTED] puolesta: José María Michia
 Lähetetty: pe 21.11.2008 5:51
 Vastaanottaja: Pietro Giannini
 Kopio: mapserver-users@lists.osgeo.org
 Aihe: Re: [mapserver-users] Create a file GML from a layer of 
 typeannotation.

 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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users