AW: [mapserver-users] Re: symbol position moving when using angle

2011-06-21 Thread Maul, Andreas-Alexander
Hi Bart,
may be this is what you are looking for:
From the map file documentation:

LABEL
...
POSITION [ul|uc|ur|cl|cc|cr|ll|lc|lr|auto]
Position of the label relative to the labeling point (layers only). First 
letter is Y position, second letter is X position. Auto tells MapServer 
to calculate a label position that will not interfere with other labels. With 
points, MapServer selects from the 8 outer positions (i.e. excluding cc). With 
polygons, MapServer selects from cc (added in MapServer 5.4), uc, lc, cl and cr 
as possible positions. With lines, it only uses lc or uc, until it finds a 
position that doesn't collide with labels that have already been drawn. If all 
positions cause a conflict, then the label is not drawn (Unless the label's 
FORCE a parameter is set to true). Auto placement is only available with 
cached labels.

Regards,
Andreas

-Ursprüngliche Nachricht-
Von: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Bart van den 
Eijnden (OSGIS)
Gesendet: Dienstag, 21. Juni 2011 15:55
An: Robert Hollingsworth
Cc: mapserver-users@lists.osgeo.org
Betreff: Re: [mapserver-users] Re: symbol position moving when using angle

Hi Robert,

thanks for your answer, indeed that must be the explanation.

However, the ESRI software (ArcMap in this case) is doing what we expect
with the same true type font.

Best regards,
Bart

 looks to me like the 'base point' around which the symbol is defined in
 terms
 of x-y position, and therefore around which the thing will rotate -- is to
 the lower-left of the visible exclamation mark:

    #
    #
    #

    #
 x   rotates around this

 while you really want something like:

    #
    #
    #    rotates around this point

    #

 I'm guessing this is the normal case for most ttf's?  Can you find or
 create a ttf char that is defined like the second case?  Otherwise
 probably need to use a bitmap or just block out what you need with
 mapserver vector symbology

 Robert
 ==
 original msg
 ==
 Hi list,

 hopefully someone can explain the following issue to me.

 I am using a vector symbol (ttf), and when using no angle, it is
 positioned correctly.

 However, when I use ANGLE on the STYLE (using an attribute in the
 dataset), things get weird and the symbol position changes.

 Image brous4.png (no rotation in Mapserver, red exclamation marks are
 Mapserver, black exclamation marks are ArcMap, blue dot is the same
 Mapserver layer using a circle symbol to display the location):

 http://www.osgis.nl/download/mapserver/brous4.png

 Image brous3.png, now we rotate the symbols in Mapserver, but their
 location is moving (a simple OFFSET does not seem to be a possible
 solution however):

 http://www.osgis.nl/download/mapserver/brous3.png

 TIA for any guidance.

 Best regards,
 Bart
 ___
 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: AW: [mapserver-users] Re: symbol position moving when using angle

2011-06-21 Thread Bart van den Eijnden (OSGIS)
Hi Andreas,

I am not drawing labels in this particular case, I am drawing points with
a ttf symbol.

CLASS
  STYLE
ANGLE [GRADENHOEK]
SYMBOL foo
SIZE 50
COLOR 255 0 0
  END
END

SYMBOL
  NAME foo
  TYPE TRUETYPE
  FONT arial
  CHARACTER #33;
  ANTIALIAS TRUE
END

Best regards,
Bart

 Hi Bart,
 may be this is what you are looking for:
 From the map file documentation:

 LABEL
 ...
 POSITION [ul|uc|ur|cl|cc|cr|ll|lc|lr|auto]
 Position of the label relative to the labeling point (layers only).
 First letter is Y position, second letter is X position. Auto
 tells MapServer to calculate a label position that will not interfere
 with other labels. With points, MapServer selects from the 8 outer
 positions (i.e. excluding cc). With polygons, MapServer selects from
 cc (added in MapServer 5.4), uc, lc, cl and cr as possible positions.
 With lines, it only uses lc or uc, until it finds a position that
 doesn't collide with labels that have already been drawn. If all
 positions cause a conflict, then the label is not drawn (Unless the
 label's FORCE a parameter is set to true). Auto placement is only
 available with cached labels.

 Regards,
 Andreas

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Bart van
 den Eijnden (OSGIS)
 Gesendet: Dienstag, 21. Juni 2011 15:55
 An: Robert Hollingsworth
 Cc: mapserver-users@lists.osgeo.org
 Betreff: Re: [mapserver-users] Re: symbol position moving when using angle

 Hi Robert,

 thanks for your answer, indeed that must be the explanation.

 However, the ESRI software (ArcMap in this case) is doing what we expect
 with the same true type font.

 Best regards,
 Bart

 looks to me like the 'base point' around which the symbol is defined in
 terms
 of x-y position, and therefore around which the thing will rotate -- is
 to
 the lower-left of the visible exclamation mark:

    #
    #
    #

    #
 x   rotates around this

 while you really want something like:

    #
    #
    #    rotates around this point

    #

 I'm guessing this is the normal case for most ttf's?  Can you find or
 create a ttf char that is defined like the second case?  Otherwise
 probably need to use a bitmap or just block out what you need with
 mapserver vector symbology

 Robert
 ==
 original msg
 ==
 Hi list,

 hopefully someone can explain the following issue to me.

 I am using a vector symbol (ttf), and when using no angle, it is
 positioned correctly.

 However, when I use ANGLE on the STYLE (using an attribute in the
 dataset), things get weird and the symbol position changes.

 Image brous4.png (no rotation in Mapserver, red exclamation marks are
 Mapserver, black exclamation marks are ArcMap, blue dot is the same
 Mapserver layer using a circle symbol to display the location):

 http://www.osgis.nl/download/mapserver/brous4.png

 Image brous3.png, now we rotate the symbols in Mapserver, but their
 location is moving (a simple OFFSET does not seem to be a possible
 solution however):

 http://www.osgis.nl/download/mapserver/brous3.png

 TIA for any guidance.

 Best regards,
 Bart
 ___
 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] Mapserver docs mobile app

2011-06-21 Thread Lime, Steve D (DNR)
Good idea. Site works nice on an iPhone 4...

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Daniel Morissette
Sent: Monday, June 20, 2011 8:49 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Mapserver docs mobile app

On 11-06-20 09:02 AM, Jeff McKenna wrote:
 On 11-06-20 6:21 AM, Sven Schroeter wrote:

 The webapp you can find here:
 http://www.netgis.de/mapserver_mdoc/

 If you want, I can upload the app in the android market.
 Maybe you can give feedback how it works on other android devices?
 Thanks and greetings
 Sven

 Interesting. I would say once you are satisfied with it fire an email to
 the mapserver-dev mailing list and we can post it on the MapServer website.



Very cool indeed!

The web version could become http://m.mapserver.org/ ...

-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

___
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] Mapserver 6.0 regex

2011-06-21 Thread Lime, Steve D (DNR)
Hmmm... A plain 'ol regex expression did not change between 5.6 and 6.0, so 
this is still valid:

  FILTERITEM 'myitem'
  FILTER /myregex/

Where regex's changed is inside logical expressions:

  FILTER ('[myitem]' ~= /myregex/) becomes FILTER ('[myitem]' ~ 'myregex')

There are regression tests for these cases (query/filters.map) so I'm pretty 
sure MapServer proper is working ok. You might try setting the filter and 
filteritem directly in the mapfile see if that works. If it does then it's 
likely a problem with PHP/MapScript.

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green
Sent: Monday, June 20, 2011 12:39 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Mapserver 6.0 regex

I have one (hopefully the last!) problem with migrating from Mapserver 4.6 to 
6.0, this time over the use of regex.

Using Mapscript  on a Fedora platform I have been setting a filter in this 
manner:


$map=newMapobj(/var/www/vhosts/mysite/httpdocs/test.map);
$layer1=$map-getLayerByName(test1);
$layer1-set(filteritem, Attribute1);
$layer1-setFilter(/target/);

This worked fine, but not anymore.  I see in the migration guide that a regex 
should now be delineated as a string so I assume that /target/ should become 
target. But that doesn't work either.


I am wondering if part of the problem is that as well as going from Mapserver 
4.6 to 5.0 I also changed from Fedora to Ubuntu 10.04, and I see from the 
Mapserver documentation on Expressions that the OS may affect regex operation.

Am I missing something obvious here?   I am really tired of going in circles 
over this...


Chris








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


Re: [mapserver-users] Asking for guidelines about a project

2011-06-21 Thread Saka Royban
Thanks a lot for your informative answers.
As u mentioned, it's going to be off topic (of mapserver, Postgis list sounds a 
better place for it), but unfortunately I'm still confused.
According to what i understood from your Select(s), you are saving all vehicles 
with their points and timestamps in one table. Why not to partition this into 
some tables for preventing a large table?
(because i have to deal a growing number of vehicles, this is of importance to 
me)

Dear Ben
Also, I'm so sorry, but i didn't find Regina Obe comments on running tracks in 
internet. Do u have any more information?

With best wishes
Best Regards





From: Ben Madin li...@remoteinformation.com.au
To: mapserver-users@lists.osgeo.org
Sent: Tue, June 21, 2011 8:59:46 AM
Subject: Re: [mapserver-users] Asking for guidelines about a project

Brent et al,

Becoming off topic, but ours went something like :

DATA the_move FROM (select ST_MakeLine(the_geom) as the_move, sq.polltime
FROM (SELECT the_geom, CAST(polltime AS date) as polltime
FROM vms
WHERE vesselname like '%pg_sql%'
ORDER BY polltime LIMIT 36) sq
GROUP BY sq.polltime) AS foo USING UNIQUE polltime USING SRID=4326

but all credit for the concept goes to Regina Obe  - I think she was showing 
running tracks! try postgresonline or the postgis list.

cheers

Ben




On 21/06/2011, at 11:15 AM, mapserver-users-requ...@lists.osgeo.org wrote:

From: Brent Fraser bfra...@geoanalytic.com

Date: 20 June 2011 11:43:52 PM AEST

To: Ben Madin li...@remoteinformation.com.au

Cc: mapserver-users@lists.osgeo.org

Subject: Re: [mapserver-users] Asking for guidelines about a project


Ben,

  Our setup was similar.  We had a current_location table and a 
 archive_location 
table.  To filter the archive_location for positions in the last 24 hours we 
had 
a view:

CREATE VIEW archive_v AS
SELECT 
   archive_location.vessel_id,
   archive_location.time_fix,
   archive_location.speed,
   archive_location.heading,
   archive_location.vessel_coordinate,
   archive_location.archive_sequence,
   vessel_cfg.vessel_name,
   owner.org_name
FROM archive_location,owner,vessel_cfg
WHERE archive_location.owner_id=owner.org_id AND
  archive_location.vessel_id=vessel_cfg.vessel_id AND
  ((now() AT TIME ZONE 'utc') - (archive_location.time_fix)) 
 =  
'24 hour';

I can't recall how we created linestrings for the tracks from the above view, 
but I think we used the archive_sequence number (this was assigned at insert 
time, per vessel) to order the points into lines.

Best Regards, Brent Fraser

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


Re: [mapserver-users] Asking for guidelines about a project

2011-06-21 Thread Brent Fraser
Mainly because adding a new vehicle is trivial from a site 
maintenance perspective if you have all vehicles in one table.  Adding a 
table would likely mean you would need to add a layer in Mapserver, but 
it depends on your user interface needs.


For my first implementation, I did have some concerns regarding 
performance if I put all the historical positions in a table with the 
current positions.  That's why I had two tables: current_position table 
with about 6 to 20 rows (since I have 6 to 20 vehicles), and an 
archive_positions table that grew over time.  Since the user was usually 
just concerned with displaying the current position, queries were 
handled very quickly.


  As it turned out, the archive_positions table grew to only several 
hundred thousand records (maybe a million?), and Postgresql had no 
problems with that.  So if I did it again, I'd likely use one table, 
containing the current and historical positions.


  But as I mentioned earlier, it might depend on how may vehicles you 
anticipate tracking, and how often they report (and to some extent how 
fast they move).   Do you have that information?


Best Regards,
Brent Fraser


On 6/21/2011 12:21 PM, Saka Royban wrote:

Thanks a lot for your informative answers.
As u mentioned, it's going to be off topic (of mapserver, Postgis list 
sounds a better place for it), but unfortunately I'm still confused.
According to what i understood from your Select(s), you are saving all 
vehicles with their points and timestamps in one table. Why not to 
partition this into some tables for preventing a large table?
(because i have to deal a growing number of vehicles, this is of 
importance to me)


Dear Ben
Also, I'm so sorry, but i didn't find Regina Obe comments on running 
tracks in internet. Do u have any more information?


With best wishes
Best Regards


*From:* Ben Madin li...@remoteinformation.com.au
*To:* mapserver-users@lists.osgeo.org
*Sent:* Tue, June 21, 2011 8:59:46 AM
*Subject:* Re: [mapserver-users] Asking for guidelines about a project

Brent et al,

Becoming off topic, but ours went something like :

DATA the_move FROM (select ST_MakeLine(the_geom) as the_move, sq.polltime
FROM (SELECT the_geom, CAST(polltime AS date) as polltime
FROM vms
WHERE vesselname like '%pg_sql%'
ORDER BY polltime LIMIT 36) sq
GROUP BY sq.polltime) AS foo USING UNIQUE polltime USING SRID=4326

but all credit for the concept goes to Regina Obe  - I think she was 
showing running tracks! try postgresonline or the postgis list.


cheers

Ben



On 21/06/2011, at 11:15 AM, mapserver-users-requ...@lists.osgeo.org 
mailto:mapserver-users-requ...@lists.osgeo.org wrote:


*From:*Brent Fraser bfra...@geoanalytic.com 
mailto:bfra...@geoanalytic.com

*Date:*20 June 2011 11:43:52 PM AEST
*To:*Ben Madin li...@remoteinformation.com.au 
mailto:li...@remoteinformation.com.au
*Cc:*mapserver-users@lists.osgeo.org 
mailto:mapserver-users@lists.osgeo.org

*Subject:**Re: [mapserver-users] Asking for guidelines about a project*


Ben,

  Our setup was similar.  We had a current_location table and a 
archive_location table.  To filter the archive_location for positions 
in the last 24 hours we had a view:


CREATE VIEW archive_v AS
SELECT
   archive_location.vessel_id,
   archive_location.time_fix,
   archive_location.speed,
   archive_location.heading,
   archive_location.vessel_coordinate,
   archive_location.archive_sequence,
   vessel_cfg.vessel_name,
   owner.org_name
FROM archive_location,owner,vessel_cfg
WHERE archive_location.owner_id=owner.org_id AND
  archive_location.vessel_id=vessel_cfg.vessel_id AND
  ((now() AT TIME ZONE 'utc') - 
(archive_location.time_fix)) =  '24 hour';


I can't recall how we created linestrings for the tracks from the 
above view, but I think we used the archive_sequence number (this was 
assigned at insert time, per vessel) to order the points into lines.

Best Regards,
Brent Fraser




___
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] MapServer 6 - CGI but php mapscript not

2011-06-21 Thread Eduardo Kanegae
Hi,

When trying to load php_mapscript module my PHP crashes and report the
following error:

[17-Jun-2011 20:28:21] PHP Warning:  PHP Startup: Unable to load dynamic
library '/usr/lib/php/modules/php_mapscript.so' -
/usr/lib/php/modules/php_mapscript.so: undefined symbol: zval_set_isref_p in
Unknown on line 0

and does not appear at phpinfo() output.

I´m running a CentOS Linux 5.6 with MapServer 6, Apache 2.2.3, PHP 5.2.10
(with apache handler) and this was my configure script general output:

MapServer is now configured for

 -- Compiler Info -
  C compiler:gcc -O2 -fPIC -Wall  -DNDEBUG
  C++ compiler:  g++ -O2 -fPIC -Wall  -DNDEBUG
  Debug:
  Generic NINT:

 -- Renderer Settings -
  OpenGL support:
  zlib support:  -DUSE_ZLIB
  png support:   -DUSE_PNG
  gif support:   -DUSE_GIF
  jpeg support:  -DUSE_JPEG
  freetype support:  -DUSE_FREETYPE
  iconv support: -DUSE_ICONV
  AGG support:   internal
  SVG Symbol support:-DUSE_AGG_SVG_SYMBOLS
  Cairo (SVG,PDF) support:   -DUSE_CAIRO
  KML support:   -DUSE_KML

 -- Support Libraries -
  Proj.4 support:-DUSE_PROJ
  Libxml2 support:   -DUSE_LIBXML2
  FriBidi support:   -DUSE_FRIBIDI
  Curl support:  -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH
  FastCGI support:
  Threading support: -DUSE_THREAD
  GEOS support:  -DUSE_GEOS
  XML Mapfile support:-DUSE_XMLMAPFILE
  XSLT support:  -DUSE_XSLT
  EXSLT support:  -DUSE_EXSLT

 -- Data Format Drivers ---
  PostGIS support:   -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION
  ArcSDE support:
  OGR support:   -DUSE_OGR
  GDAL support:  -DUSE_GDAL
  Oracle Spatial support:

 -- OGC Services --
  WMS Server:-DUSE_WMS_SVR
  WMS Client:-DUSE_WMS_LYR
  WFS Server:-DUSE_WFS_SVR
  WFS Client:-DUSE_WFS_LYR
  WCS Server:-DUSE_WCS_SVR
  SOS Server:-DUSE_SOS_SVR

 -- MapScript -
  PHP MapScript: yes

What did I put wrong at ./configure ?

thanks

-- 
Eduardo Patto Kanegae
http://www.webmapit.com.br
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Asking for guidelines about a project

2011-06-21 Thread Saka Royban
There is at least (and for now) 100 vehicles with update rate of 5-15 minute.
That' why i'm so careful abut table design.

Anyway, thanks a million for all your helpful answers.

Regards





From: Brent Fraser bfra...@geoanalytic.com
To: Saka Royban sakaroy...@yahoo.com
Cc: MapServer mapserver-users@lists.osgeo.org
Sent: Tue, June 21, 2011 11:14:14 PM
Subject: Re: [mapserver-users] Asking for guidelines about a project

  Mainly because adding a new vehicle is trivial from a site 
maintenance 
perspective if you have all vehicles in one table.  Adding a table would 
likely mean you would need to add a layer in Mapserver, but it depends on 
your user interface needs.

For my first implementation, I did have some concerns regarding 
performance if I put all the historical positions in a table with the 
current positions.  That's why I had two tables: current_position table 
with 
about 6 to 20 rows (since I have 6 to 20 vehicles), and an 
archive_positions 
table that grew over time.  Since the user was usually just concerned with 
displaying the current position, queries were handled very quickly.

  As it turned out, the archive_positions table grew to only several 
hundred 
thousand records (maybe a million?), and Postgresql had no problems with 
that.  So if I did it again, I'd likely use one table, containing the 
current and historical positions.

  But as I mentioned earlier, it might depend on how may vehicles you 
anticipate tracking, and how often they report (and to some extent how fast 
they move).   Do you have that information?

Best Regards, Brent Fraser
On 6/21/2011 12:21 PM, Saka Royban wrote: 
Thanks a lot for your informative answers.
As u mentioned, it's going to be off topic (of mapserver,   Postgis 
list 
sounds a better place for it), but unfortunately   I'm still confused.
According to what i understood from your Select(s), you are   saving 
all 
vehicles with their points and timestamps in one   table. Why not to 
partition this into some tables for   preventing a large table?
(because i have to deal a growing number of vehicles, this is   of 
importance to me)

Dear Ben
Also, I'm so sorry, but i didn't find Regina Obe comments on   running 
tracks in internet. Do u have any more information?

With best wishes
Best Regards





From: Ben Madin li...@remoteinformation.com.au
To: mapserver-users@lists.osgeo.org
Sent: Tue,   June 21, 2011 8:59:46 AM
Subject: Re: [mapserver-users] Asking for guidelines about a   
project

Brent et al, 


Becoming off topic, but ours went something like :


DATA the_move FROM (select ST_MakeLine(the_geom) as the_move, 
sq.polltime
FROM (SELECT the_geom, CAST(polltime AS date) as polltime
FROM vms
WHERE vesselname like '%pg_sql%'
ORDER BY polltime LIMIT 36) sq
GROUP BY sq.polltime) AS foo USING UNIQUE polltime USING 
SRID=4326


but all credit for the concept goes to Regina Obe  - I   think she 
was showing running tracks! try postgresonline   or the postgis 
list.


cheers


Ben






On 21/06/2011, at 11:15 AM, mapserver-users-requ...@lists.osgeo.org wrote:

From: Brent   Fraser bfra...@geoanalytic.com

Date: 20   June 2011 11:43:52 PM AEST

To: Ben   Madin li...@remoteinformation.com.au

Cc: mapserver-users@lists.osgeo.org

Subject: Re: [mapserver-users] Asking for guidelines 
about a project


Ben,

  Our setup was similar.  We had a current_location   table 
 and 
a archive_location table.  To filter the   archive_location 
for 
positions in the last 24 hours we   had a view:

CREATE VIEW archive_v AS
SELECT 
   archive_location.vessel_id,
   archive_location.time_fix,
   archive_location.speed,
   archive_location.heading,
   archive_location.vessel_coordinate,
   archive_location.archive_sequence,
   vessel_cfg.vessel_name,
   owner.org_name
FROM archive_location,owner,vessel_cfg
WHERE   archive_location.owner_id=owner.org_id AND

archive_location.vessel_id=vessel_cfg.vessel_id AND
  ((now() AT TIME ZONE 'utc') -   
(archive_location.time_fix)) =  '24 hour';

I can't recall how we created linestrings for the   tracks 
from 
the above view, but I think we used the   archive_sequence 
number (this was assigned at insert   time, per vessel) to 
order 
the points into lines.

Best Regards, Brent Fraser