Re: [mapserver-users] Mapfile Generators

2012-02-03 Thread pcreso
Hi Paul,

QGIS has such a tool, I'm not sure about Arc.

You should be able to handcraft a generic mapfile as a template you can re-use 
as required. I had a use case some time ago for this sort of thing & used a 
Linux shell script to make the text substitutions in such a template from 
reading a spreadsheet containing the mapfile parameters required for each 
individual shapefile.

These days I tend to manage data in Postgis, & use a filter or mapserver's 
variable substitution to manage such situations.

Using a single mapfile with cgi wrappers to re-use it in this way for different 
datasets works better for me than maintaining lots of separate mapfiles.

In a couple of situations where this is not flexible enough, having a cgi 
actually contain the mapfile text, so it writes the customised mapfile, then 
invokes it, also works for me.

Cheers,
   
   Brent Wood


--- On Sat, 2/4/12, Paul Maddock  wrote:

From: Paul Maddock 
Subject: [mapserver-users] Mapfile Generators
To: "mapserver-users@lists.osgeo.org" 
Date: Saturday, February 4, 2012, 2:49 AM

Hi all,  Are there any extensions of ArcView 10 which I can export .shp files 
into mapfiles or possibly any other open source mapfile generators?  It seems 
time consuming to manually create these map files if I have a large collection 
of shapefiles.   Many thanks,Paul
-Inline Attachment Follows-

___
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] Run time substitution - Like instead of =

2012-02-03 Thread Rahkonen Jukka
Hi,

Perhaps someone can tell if you could use the default value to "NOT 
something_very_off", which would then select everything for you.

-Jukka Rahkonen-

 tellett wrote:

> Hi All,

> I'm using runtime substitution to replace the value of an expression and
thats working fine, however, if I don't set the expression value in the url,
I want the layer to show all the records. For example my class looks likes
this:

CLASS
 NAME 'FKB-A'
 EXPRESSION '%pn%'
 STYLE
COLOR 254 150 254
OUTLINECOLOR 1 1 1
 END
  END

and when I use this request:

.REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=fkb_prosjektstandard&STYLES=&FORMAT=image/png&BGCOLOR=0xFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=58.9930983171506,9.40049150322111,59.8470137571506,10.904184647298&WIDTH=1650&HEIGHT=937&pn=LACHVE11

I get back 1 record which is correct. However, if I drop the &pn=LACHVE11 of
course I get no results back. Is there any way of changing this so that I
can get all the records of the table returned?

I thought about using the 'default_pn' option in the metadata and using
wildcards but as this is an '=' expression rather than a 'LIKE' expression
wildcards are useless. Maybe its just because its friday afternoon, but I
just can't see a way of doing this, help!!!

Best Regards

Tom

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Run-time-substitution-Like-instead-of-tp4362317p4362317.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
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] RE: RE: Re: Can't get Tinyows WFS Layer to show in OpenLayer

2012-02-03 Thread Wang, Ya
Stops" />

I was relieved of the frustration I have been suffering during the past two 
days. Thanks everyone.

Ya







___
Message: 5
Date: Thu, 2 Feb 2012 08:57:52 +0100
From: Olivier Courtin 
Subject: Re: [mapserver-users] Can't get Tinyows WFS Layer to show in
OpenLayer
To: "mapserver-users@lists.osgeo.org"

Message-ID:

Content-Type: text/plain; charset="windows-1252"

On Wed, Feb 1, 2012 at 7:33 PM, Wang, Ya  wrote:

Hi,

 I am a newbie of mapserver and other online mapping technologies.
> Recently, I have been struggling to load a TinyOWS WFS Layer to an
> OpenLayers map.  I set up proxy.cgi, which works fine. I checked TinyOWS
> using command ?tinyows ?check?, which also seems to be working. The page
> http://.../cgi-bin/tinyows.exe?service=wfs&request=getCapabilities&version=1.1.0&typename=tows:lrtstopsdoesn?t
>  return any error either.  I can also load a mapserver WMS layer
> into the OpenLayers Map with no problem. However, no feature from the WFS
> layer would show in the OpenLayers map.  Since both the WMS and WFS layers
> are of the same projection, which is EPSG:2227, I assume that the
> misspecification of projection is not likely to be the caprice here.   The
> following is the JavaScript I used and the response returned. Could someone
> help me find out what I did wrong? Many thanks in advance!
>
> **
>
> **
>

Several questions related to your issue:

- What TinyOWS version do you use ?

- What happen if you use QGIS as WMS/WFS client rather than OpenLayers ?

- Could you activate TinyOWS log and check if there's any error message in
it ?

- Could you use Firebug with OpenLayers to check the TinyOWS output stream ?


HTH,

--
Olivier
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120202/dc523795/attachment.html

--

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


End of mapserver-users Digest, Vol 49, Issue 4
**
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


--

Message: 4
Date: Fri, 3 Feb 2012 09:16:43 +0100
From: Dejan Gambin 
Subject: [mapserver-users] Using WFS gml_[item name]_alias
To: mapserver-users@lists.osgeo.org
Message-ID: 
Content-Type: text/plain; charset="us-ascii"

Hi,

I am trying to use gml_[item name]_alias for renaming my columns in wfs 
GetFeature request with gml output. Everything works fine except I can't use 
some characters like whitespace for example, because it is not a valid xml 
element.

My question is - is there any way to name my attribute like "my attribute" 
through WFS GetFeature request? 

Btw, I am presenting the result in a html table, so would be useful, for 
example, to be able to handle this and other stuff like type for example 
(integer, string, ..) through the mapfile. And maybe to use this on the client 
to align data in a table (numbers right, string left, etc.)

Thanks very much on any useful info

regards, dejan
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120203/5ce981ff/attachment-0001.html

--

Message: 5
Date: Fri, 3 Feb 2012 09:33:15 +0100
From: thomas bonfort 
Subject: Re: [mapserver-users] PostGIS Connection String - Thread
Issue?
To: Trent Pingenot 
Cc: mapserver-users@lists.osgeo.org
Message-ID:

Content-Type: text/plain; charset=UTF-8

There were some changes to string quoting/escaping in version 6 (I think).

Are the errors you are seeing intermittent, or is it reproducible
consistently on all requests?
What happens if you use

CONNECTION "dbname=interlocken user=interlocken ..."

instead of

CONNECTION "dbname='interlocken' user='interlocken' ..."

--
thomas

On Thu, Feb 2, 2012 at 23:00, Trent Pingenot  wrote:
> Hi list,
>
> We recently upgraded from MapServer 5.x to 6.0.1 on Linux.?? We have 21 sites
> running all running smoothly with identical configurations off this server.
> On one site the MapServer connection to Postgres/PostGIS fails on all
> layers.?? The MS debug message is as follows
>
> [Thu Feb  2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error.
> Database connection failed (FATAL:  no pg_hba.conf entry for host "[local]",
> user "interlocken", database "nterlocNken", SSL off
> ) with connect string 'dbname='nterlocNk

[mapserver-users] Re: Re: Can't get Tinyows WFS Layer to show in OpenLayer

2012-02-03 Thread Wang, Ya
t;

Message-ID:

Content-Type: text/plain; charset="windows-1252"

On Wed, Feb 1, 2012 at 7:33 PM, Wang, Ya  wrote:

Hi,

 I am a newbie of mapserver and other online mapping technologies.
> Recently, I have been struggling to load a TinyOWS WFS Layer to an
> OpenLayers map.  I set up proxy.cgi, which works fine. I checked TinyOWS
> using command ?tinyows ?check?, which also seems to be working. The page
> http://.../cgi-bin/tinyows.exe?service=wfs&request=getCapabilities&version=1.1.0&typename=tows:lrtstopsdoesn?t
>  return any error either.  I can also load a mapserver WMS layer
> into the OpenLayers Map with no problem. However, no feature from the WFS
> layer would show in the OpenLayers map.  Since both the WMS and WFS layers
> are of the same projection, which is EPSG:2227, I assume that the
> misspecification of projection is not likely to be the caprice here.   The
> following is the JavaScript I used and the response returned. Could someone
> help me find out what I did wrong? Many thanks in advance!
>
> **
>
> **
>

Several questions related to your issue:

- What TinyOWS version do you use ?

- What happen if you use QGIS as WMS/WFS client rather than OpenLayers ?

- Could you activate TinyOWS log and check if there's any error message in
it ?

- Could you use Firebug with OpenLayers to check the TinyOWS output stream ?


HTH,

--
Olivier
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120202/dc523795/attachment.html

--

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


End of mapserver-users Digest, Vol 49, Issue 4
**
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


--

Message: 4
Date: Fri, 3 Feb 2012 09:16:43 +0100
From: Dejan Gambin 
Subject: [mapserver-users] Using WFS gml_[item name]_alias
To: mapserver-users@lists.osgeo.org
Message-ID: 
Content-Type: text/plain; charset="us-ascii"

Hi,

I am trying to use gml_[item name]_alias for renaming my columns in wfs 
GetFeature request with gml output. Everything works fine except I can't use 
some characters like whitespace for example, because it is not a valid xml 
element.

My question is - is there any way to name my attribute like "my attribute" 
through WFS GetFeature request? 

Btw, I am presenting the result in a html table, so would be useful, for 
example, to be able to handle this and other stuff like type for example 
(integer, string, ..) through the mapfile. And maybe to use this on the client 
to align data in a table (numbers right, string left, etc.)

Thanks very much on any useful info

regards, dejan
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120203/5ce981ff/attachment-0001.html

--

Message: 5
Date: Fri, 3 Feb 2012 09:33:15 +0100
From: thomas bonfort 
Subject: Re: [mapserver-users] PostGIS Connection String - Thread
Issue?
To: Trent Pingenot 
Cc: mapserver-users@lists.osgeo.org
Message-ID:

Content-Type: text/plain; charset=UTF-8

There were some changes to string quoting/escaping in version 6 (I think).

Are the errors you are seeing intermittent, or is it reproducible
consistently on all requests?
What happens if you use

CONNECTION "dbname=interlocken user=interlocken ..."

instead of

CONNECTION "dbname='interlocken' user='interlocken' ..."

--
thomas

On Thu, Feb 2, 2012 at 23:00, Trent Pingenot  wrote:
> Hi list,
>
> We recently upgraded from MapServer 5.x to 6.0.1 on Linux.?? We have 21 sites
> running all running smoothly with identical configurations off this server.
> On one site the MapServer connection to Postgres/PostGIS fails on all
> layers.?? The MS debug message is as follows
>
> [Thu Feb  2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error.
> Database connection failed (FATAL:  no pg_hba.conf entry for host "[local]",
> user "interlocken", database "nterlocNken", SSL off
> ) with connect string 'dbname='nterlocNken' user='interlocken'
> password=***'
>
> And the entry in the map file
>
> CONNECTIONTYPE postgis
> PROCESSING "CLOSE_CONNECTION=DEFER"
> CONNECTION "dbname='interlocken' user='interlocken'
> password='**'"
> DATA 'the_geom FROM "ext_lighting_existing_poi

Re: [mapserver-users] Run time substitution - Like instead of =

2012-02-03 Thread Smith, Michael ERDC-CRREL-NH
Tom,

What I am using with a database connection is a default value of "1=1" so
that is always true, it returns all records.

Mike

-- 
Michael Smith

Remote Sensing/GIS Center
US Army Corps of Engineers



On 2/3/12  11:30 AM, "tellett"  wrote:

>Hi All,
>
>I'm using runtime substitution to replace the value of an expression and
>thats working fine, however, if I don't set the expression value in the
>url,
>I want the layer to show all the records. For example my class looks likes
>this:
>
>CLASS
> NAME 'FKB-A'
> EXPRESSION '%pn%'
> STYLE
>COLOR 254 150 254
>OUTLINECOLOR 1 1 1
> END
>  END
>
>and when I use this request:
>
>.REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=fkb_prosjektstandard&
>STYLES=&FORMAT=image/png&BGCOLOR=0xFF&TRANSPARENT=TRUE&CRS=EPSG:4326&B
>BOX=58.9930983171506,9.40049150322111,59.8470137571506,10.904184647298&WID
>TH=1650&HEIGHT=937&pn=LACHVE11
>
>I get back 1 record which is correct. However, if I drop the &pn=LACHVE11
>of
>course I get no results back. Is there any way of changing this so that I
>can get all the records of the table returned?
>
>I thought about using the 'default_pn' option in the metadata and using
>wildcards but as this is an '=' expression rather than a 'LIKE' expression
>wildcards are useless. Maybe its just because its friday afternoon, but I
>just can't see a way of doing this, help!!!
>
>Best Regards
>
>Tom
>
>--
>View this message in context:
>http://osgeo-org.1560.n6.nabble.com/Run-time-substitution-Like-instead-of-
>tp4362317p4362317.html
>Sent from the Mapserver - User mailing list archive at Nabble.com.
>___
>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] PostGIS query

2012-02-03 Thread Carlos Ruiz
Hi Julien,


> I usually use a view, but in this case there are a lot of tables 
> involved and I would like to avoid dozens of unnecessary JOIN


I think that you have a database design problem.

You can have a lot of tables which concerns to a different objects, but you 
need to show some information on a map which involves many of those tables. 
That's why you have to create different views or in the worst case, a super 
view as a spreadsheet.

I guess that's why you're talking about unnecessary JOINs, but in the end, 
you'll need to use them to create the multiple data sources or the super data 
source of your layers in the .MAP file.



IC Carlos Ruiz




 From: Julien Cigar 
To: Carlos Ruiz  
Cc: "mapserver-users@lists.osgeo.org"  
Sent: Wednesday, February 1, 2012 2:59 AM
Subject: Re: [mapserver-users] PostGIS query
 
On 01/31/2012 17:05, Carlos Ruiz wrote:
> Julien,

Hi Carlos,

>
> Have you tried with views ? When I need to map complex queries I build a
> view to just handle the where clauses.
>

I usually use a view, but in this case there are a lot of tables 
involved and I would like to avoid dozens of unnecessary JOIN

> Cheers from México
> IC Carlos Ruiz
>
> 
> *From:* Julien Cigar 
> *To:* "mapserver-users@lists.osgeo.org" 
> *Sent:* Tuesday, January 31, 2012 6:38 AM
> *Subject:* [mapserver-users] PostGIS query
>
> Hello,
>
> Is there a way to (deeply) modify the SQL query in a PostGIS layer?
> I would like to add some JOIN, additional WHERE clauses, etc
> As I'm afraid that "Run-time Substitution" isn't flexible enough for
> this case ... is there any other possibility, other than mapscript?
>
> I guess there is no possibility to define variables, conditions, etc in
> a .map file .. ?
>
> Thanks,
> Julien
>
> -- No trees were killed in the creation of this message.
> However, many electrons were terribly inconvenienced.
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


-- 
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Run time substitution - Like instead of =

2012-02-03 Thread tellett
Hi All,

I'm using runtime substitution to replace the value of an expression and
thats working fine, however, if I don't set the expression value in the url,
I want the layer to show all the records. For example my class looks likes
this:

CLASS
 NAME 'FKB-A'
 EXPRESSION '%pn%' 
 STYLE
COLOR 254 150 254
OUTLINECOLOR 1 1 1
 END
  END

and when I use this request:

.REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&LAYERS=fkb_prosjektstandard&STYLES=&FORMAT=image/png&BGCOLOR=0xFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=58.9930983171506,9.40049150322111,59.8470137571506,10.904184647298&WIDTH=1650&HEIGHT=937&pn=LACHVE11

I get back 1 record which is correct. However, if I drop the &pn=LACHVE11 of
course I get no results back. Is there any way of changing this so that I
can get all the records of the table returned? 

I thought about using the 'default_pn' option in the metadata and using
wildcards but as this is an '=' expression rather than a 'LIKE' expression
wildcards are useless. Maybe its just because its friday afternoon, but I
just can't see a way of doing this, help!!!

Best Regards

Tom

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Run-time-substitution-Like-instead-of-tp4362317p4362317.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE: How to label only largest displayed areas?

2012-02-03 Thread Stephen Woodbridge

Hi Jukka,

The labelcache could be extended to handle this, we already create and 
entry for each label, by name and by priority, if we priority was set to 
-1 or 02 for largest or smallest, and a size slot was added to the cache 
then all the rendering code would need to do isi compute the rendered 
(ie clipped) size in pixels or whatever. Database queries don't work if 
you are using shapefiles or other datasources. While postgres 
connections do support a !BOX! as Steve L mentioned not all databases 
have this coded. Size could be trivially computed as the number of 
pixels drawn for the polygon when it is rendered, although this might 
not be easily accessible given some of the newer rendering engines we 
support now.


-Steve

On 2/3/2012 10:03 AM, Rahkonen Jukka wrote:

Hi,

But still in this certain case the final select should sort by
clipped size AND group by state name AND select the biggest feature
from each group. Doesn't it feel easier to do with a database query
and addional label layer? But how to pass the WMS BBOX for the
database so it could do polygon intersections for getting the areas?
And attributes should be transferred too so that clipped areas could
be sorted by state name.

-Jukka Rahkonen-


-Alkuperäinen viesti- Lähettäjä:
mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Stephen
Woodbridge Lähetetty: 3. helmikuuta 2012 16:44 Vastaanottaja:
mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] RE: How
to label only largest displayed areas?

Phil,

In theory, it might be possible to do this by extending the
labelcache code to save the clipped area size of each polygon or a
clipped length of a line and then sort the labelcache items by size
and label them. MINDISTANCE could be applied to limit the number of
labels using the existing code. This behavior would need to be
triggered by a new LABEL keyword maybe like PRIORITY
[LARGEST|SMALLEST]

If you want to write an enhancement ticket for this in the bug
tracker you can add my comment above, but I suspect that you would
have to fund the development of this or provide a patch.

Best regards, -Steve W

On 2/3/2012 8:59 AM, Anzel, Phil - NRCS, Fort Collins, CO wrote:

Hi, Jukka and Steve,

Thanks for your replies. Jukka is correct, I do not believe it
is simple. Steve, your approach sorts all areas and then filters
by those visible in the layer's extent. I'm looking for ranking
by the clipped area. For example, if the current map and layer's
extent shows the a small sliver of the mainland of California and
a larger visible part of an island that is part of California,
only

the island

would be labeled, as its visible area is larger than that of the
sliver.

- Phil

-Original Message- From: Rahkonen Jukka
[mailto:jukka.rahko...@mmmtike.fi] Sent: Thursday, February 02,
2012 4:01 PM To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort
Collins, CO; mapserver-users@lists.osgeo.org Subject: Re: How to
label only largest displayed areas?

Hi,

I understood that meaning was to put exactly one label per
state. Each state, even tiny ones, should be labeled. But one
state should get only one label even if the map window is
splitting the state polygon into two or more intersections. Those
intersections may be bigger than the tiny state. Not extremely
simple.

-Jukka-

 L Lime, Steve D (DNR)
wrote:


I'd do this by sorting features based on area (ascending
order). This would draw the smallest polygons first, but would
put the labels for the shapes with the largest area into the
label cache last (where they would be placed and drawn first).
I've done this with labeling lakes and it works fine.


Steve

-Original Message- From:
mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of
Anzel, Phil - NRCS, Fort Collins, CO Sent: Thursday, February 02,
2012 1:43 PM To: mapserver-users@lists.osgeo.org Cc: Anzel, Phil
- NRCS, Fort Collins, CO Subject: [mapserver-users] How to label
only largest displayed areas?

Hi, All,

How can I label only the largest displayed areas within an
extent? For example, if I'm labeling states of the United States
and my extent covers a small region around the Maine, New
Hampshire and Massachusetts junction, I only want a single label
for each state, chosen by the largest displayed area (within the
current map extent) in each state.

I'm using spatial data stored in Microsoft's SQL Server 2008.

I've created an enhancement request ticket (#4173: Define a
current layer extent's WKT string for use in Data statement) as
one possible approach, but this approach requires a change to
MapServer.

Is there a better way?

Thanks.

- Phil Anzel Vistronix Inc for USDA/NRCS/ITC

This electronic message contains information generated by the
USDA solely for the intended recipients.  Any unauthorized

interception of

this message or the use or disclosure of the information it
contai

Re: [mapserver-users] PostGIS Connection String - Thread Issue?

2012-02-03 Thread thomas bonfort
Trent,
can you file a ticket for this issue please?

regards,

thomas

On Fri, Feb 3, 2012 at 17:16, Trent Pingenot  wrote:
> Thomas,
>
> That did it! I had tried removing the single quotes from the username, but
> not the db, but not both, I can't remember. By removing single quotes around
> both the dbname and the username it started working.  It's still strange to
> me that it works with single quotes on all my other sites.
>
> Thanks for your suggestion!
>
> Trent
>
>> Date: Fri, 3 Feb 2012 09:33:15 +0100
>> Subject: Re: [mapserver-users] PostGIS Connection String - Thread Issue?
>> From: thomas.bonf...@gmail.com
>> To: pi...@hotmail.com
>> CC: mapserver-users@lists.osgeo.org
>
>>
>> There were some changes to string quoting/escaping in version 6 (I think).
>>
>> Are the errors you are seeing intermittent, or is it reproducible
>> consistently on all requests?
>> What happens if you use
>>
>> CONNECTION "dbname=interlocken user=interlocken ..."
>>
>> instead of
>>
>> CONNECTION "dbname='interlocken' user='interlocken' ..."
>>
>> --
>> thomas
>>
>> On Thu, Feb 2, 2012 at 23:00, Trent Pingenot  wrote:
>> > Hi list,
>> >
>> > We recently upgraded from MapServer 5.x to 6.0.1 on Linux.  We have 21
>> > sites
>> > running all running smoothly with identical configurations off this
>> > server.
>> > On one site the MapServer connection to Postgres/PostGIS fails on all
>> > layers.  The MS debug message is as follows
>> >
>> > [Thu Feb 2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error.
>> > Database connection failed (FATAL: no pg_hba.conf entry for host
>> > "[local]",
>> > user "interlocken", database "nterlocNken", SSL off
>> > ) with connect string 'dbname='nterlocNken' user='interlocken'
>> > password=***'
>> >
>> > And the entry in the map file
>> >
>> > CONNECTIONTYPE postgis
>> > PROCESSING "CLOSE_CONNECTION=DEFER"
>> > CONNECTION "dbname='interlocken' user='interlocken'
>> > password='**'"
>> > DATA 'the_geom FROM "ext_lighting_existing_point" USING UNIQUE gid USING
>> > srid=4326'
>> >
>> > I can log into psql on the server as the interlocken user and hit the DB
>> > just fine so it's not the pg_hba.conf file settings which are set that
>> > the
>> > db username and db name must match.  My question is why
>> > does the dbname get corrupted to nterlocNken? Is this a bug or how
>> > mapserver
>> > should present the connection items in a debug statement?  I can use our
>> > old
>> > copy 5.4 copy of mapserver and it runs the map file fine.  One
>> > difference in
>> > this build is that we don't have the --with-threads support. We are
>> > looking
>> > at getting the build rebuilt with this thread locking option included.
>> > Could threading be the problem? I'm not sure how/if threading might be
>> > related but thought I would mention it.
>> >
>> > I've stripped out all layers from the mapfile except a single test
>> > layer.
>> > I've got 60+ layers running in other map files and databases with
>> > identical
>> > setups  on the same server without problems, why this one?  We even
>> > tried
>> > wiping out the DB and associated user and reloading and still the same
>> > problem.
>> >
>> > Thanks in advance for any help or tips you can provide.
>> >
>> > Thanks,
>> >
>> > Trent
>> >
>> > ___
>> > 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] PostGIS Connection String - Thread Issue?

2012-02-03 Thread Trent Pingenot

Thomas,

That did it! I had tried removing the single quotes from the username, but not 
the db, but not both, I can't remember. By removing single quotes around
both the dbname and the username it started working.  It's still strange to me 
that it works with single quotes on all my other sites.

Thanks for your suggestion!

Trent

> Date: Fri, 3 Feb 2012 09:33:15 +0100
> Subject: Re: [mapserver-users] PostGIS Connection String - Thread Issue?
> From: thomas.bonf...@gmail.com
> To: pi...@hotmail.com
> CC: mapserver-users@lists.osgeo.org
> 
> There were some changes to string quoting/escaping in version 6 (I think).
> 
> Are the errors you are seeing intermittent, or is it reproducible
> consistently on all requests?
> What happens if you use
> 
> CONNECTION "dbname=interlocken user=interlocken ..."
> 
> instead of
> 
> CONNECTION "dbname='interlocken' user='interlocken' ..."
> 
> --
> thomas
> 
> On Thu, Feb 2, 2012 at 23:00, Trent Pingenot  wrote:
> > Hi list,
> >
> > We recently upgraded from MapServer 5.x to 6.0.1 on Linux.  We have 21 sites
> > running all running smoothly with identical configurations off this server.
> > On one site the MapServer connection to Postgres/PostGIS fails on all
> > layers.  The MS debug message is as follows
> >
> > [Thu Feb  2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error.
> > Database connection failed (FATAL:  no pg_hba.conf entry for host "[local]",
> > user "interlocken", database "nterlocNken", SSL off
> > ) with connect string 'dbname='nterlocNken' user='interlocken'
> > password=***'
> >
> > And the entry in the map file
> >
> > CONNECTIONTYPE postgis
> > PROCESSING "CLOSE_CONNECTION=DEFER"
> > CONNECTION "dbname='interlocken' user='interlocken'
> > password='**'"
> > DATA 'the_geom FROM "ext_lighting_existing_point" USING UNIQUE gid USING
> > srid=4326'
> >
> > I can log into psql on the server as the interlocken user and hit the DB
> > just fine so it's not the pg_hba.conf file settings which are set that the
> > db username and db name must match.  My question is why
> > does the dbname get corrupted to nterlocNken? Is this a bug or how mapserver
> > should present the connection items in a debug statement?  I can use our old
> > copy 5.4 copy of mapserver and it runs the map file fine.  One difference in
> > this build is that we don't have the --with-threads support. We are looking
> > at getting the build rebuilt with this thread locking option included.
> > Could threading be the problem? I'm not sure how/if threading might be
> > related but thought I would mention it.
> >
> > I've stripped out all layers from the mapfile except a single test layer.
> > I've got 60+ layers running in other map files and databases with identical
> > setups  on the same server without problems, why this one?  We even tried
> > wiping out the DB and associated user and reloading and still the same
> > problem.
> >
> > Thanks in advance for any help or tips you can provide.
> >
> > Thanks,
> >
> > Trent
> >
> > ___
> > 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] RE: How to label only largest displayed

2012-02-03 Thread Anzel, Phil - NRCS, Fort Collins, CO
Hi, Steve W,

Thanks again. I'll hold on to your enhancement suggestion and if your 
MINDISTANCE/MINFEATURESIZE suggestions, coupled with Steve L.'s sorting 
suggestion do not yield a cartographically-pleasing solution, I'll create the 
enhancement ticket and investigate how best to proceed.

FWIW we're using Microsoft SQL Server 2008, which lets us clip polygons as part 
of the retrieval query. The enhancement ticket I recently submitted (#4173: 
Define a current layer extent's WKT string for use in Data statement) shows how 
it is done; the missing piece is to actually have the dimensions of the 
bounding box. My ticket asks that such information, the layer's extent as 
well-kn0wn-text, be made available for lexical substitution in the Data 
statement. Again, if your and Steve L.'s suggestions work out, the need for 
your suggested enhancement, as well as mine, fades away.

- Phil

Date: Fri, 03 Feb 2012 09:44:22 -0500
From: Stephen Woodbridge 
Subject: Re: [mapserver-users] RE: How to label only largest displayed
areas?
To: mapserver-users@lists.osgeo.org
Message-ID: <4f2bf2c6.3000...@swoodbridge.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Phil,

In theory, it might be possible to do this by extending the labelcache 
code to save the clipped area size of each polygon or a clipped length 
of a line and then sort the labelcache items by size and label them. 
MINDISTANCE could be applied to limit the number of labels using the 
existing code. This behavior would need to be triggered by a new LABEL 
keyword maybe like PRIORITY [LARGEST|SMALLEST]

If you want to write an enhancement ticket for this in the bug tracker 
you can add my comment above, but I suspect that you would have to fund 
the development of this or provide a patch.

Best regards,
   -Steve W

On 2/3/2012 8:59 AM, Anzel, Phil - NRCS, Fort Collins, CO wrote:
> Hi, Jukka and Steve,
>
> Thanks for your replies. Jukka is correct, I do not believe it is
> simple. Steve, your approach sorts all areas and then filters by
> those visible in the layer's extent. I'm looking for ranking by the
> clipped area. For example, if the current map and layer's extent
> shows the a small sliver of the mainland of California and a larger
> visible part of an island that is part of California, only the island
> would be labeled, as its visible area is larger than that of the
> sliver.
>
> - Phil
>
> -Original Message- From: Rahkonen Jukka
> [mailto:jukka.rahko...@mmmtike.fi] Sent: Thursday, February 02, 2012
> 4:01 PM To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort Collins,
> CO; mapserver-users@lists.osgeo.org Subject: Re: How to label only
> largest displayed areas?
>
> Hi,
>
> I understood that meaning was to put exactly one label per state.
> Each state, even tiny ones, should be labeled. But one state should
> get only one label even if the map window is splitting the state
> polygon into two or more intersections. Those intersections may be
> bigger than the tiny state. Not extremely simple.
>
> -Jukka-
>
>  L Lime, Steve D (DNR)
> wrote:
>
>> I'd do this by sorting features based on area (ascending order).
>> This would draw the smallest polygons first, but would put the
>> labels for the shapes with the largest area into the label cache
>> last (where they would be placed and drawn first). I've done this
>> with labeling lakes and it works fine.
>
> Steve
>
> -Original Message- From:
> mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Anzel,
> Phil - NRCS, Fort Collins, CO Sent: Thursday, February 02, 2012 1:43
> PM To: mapserver-users@lists.osgeo.org Cc: Anzel, Phil - NRCS, Fort
> Collins, CO Subject: [mapserver-users] How to label only largest
> displayed areas?
>
> Hi, All,
>
> How can I label only the largest displayed areas within an extent?
> For example, if I'm labeling states of the United States and my
> extent covers a small region around the Maine, New Hampshire and
> Massachusetts junction, I only want a single label for each state,
> chosen by the largest displayed area (within the current map extent)
> in each state.
>
> I'm using spatial data stored in Microsoft's SQL Server 2008.
>
> I've created an enhancement request ticket (#4173: Define a current
> layer extent's WKT string for use in Data statement) as one possible
> approach, but this approach requires a change to MapServer.
>
> Is there a better way?
>
> Thanks.
>
> - Phil Anzel Vistronix Inc for USDA/NRCS/ITC
>
> This electronic message contains information generated by the USDA
> solely for the intended recipients.  Any unauthorized interception of
> this message or the use or disclosure of the information it contains
> may violate the law and subject the violator to civil or criminal
> penalties.  If you believe you have received this message in error,
> please notify the sender and delete the email immediately.


__

[mapserver-users] RE: How to label only largest displayed areas?

2012-02-03 Thread Anzel, Phil - NRCS, Fort Collins, CO
Steve,

Thanks for the additional MINFEATURESIZE suggestion. That parameter, alongside 
of MINDISTANCE, may be quite satisfactory.

- Phil

-Original Message-
From: Lime, Steve D (DNR) [mailto:steve.l...@state.mn.us] 
Sent: Friday, February 03, 2012 7:47 AM
To: Rahkonen Jukka; Anzel, Phil - NRCS, Fort Collins, CO; 
mapserver-users@lists.osgeo.org
Subject: RE: How to label only largest displayed areas?

I interpreted differently, probably incorrectly. It would be helpful to see 
pictures with questions like this. I do think that sorting, plus label 
MINDISTANCE, plus label MINFEATURESIZE would probably produce useable results 
in most cases. 

The only other solution I can think of would be to clip features in the 
database. PostGIS has the !bbox! hack to allow this. I don't know if the other 
DBs also support it.

Steve

-Original Message-
From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] 
Sent: Thursday, February 02, 2012 5:01 PM
To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort Collins, CO; 
mapserver-users@lists.osgeo.org
Subject: Re: How to label only largest displayed areas?

Hi,

I understood that meaning was to put exactly one label per state. Each state, 
even tiny ones, should be labeled. But one state should get only one label even 
if the map window is splitting the state polygon into two or more 
intersections. Those intersections may be bigger than the tiny state. Not 
extremely simple.

-Jukka-


L Lime, Steve D (DNR) wrote:

> I'd do this by sorting features based on area (ascending order). This would 
> draw the smallest polygons first, but would put the labels for the shapes 
> with the largest area into the label cache last (where they would be placed 
> and drawn first). I've done this with labeling lakes and it works fine.

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Anzel, Phil - 
NRCS, Fort Collins, CO
Sent: Thursday, February 02, 2012 1:43 PM
To: mapserver-users@lists.osgeo.org
Cc: Anzel, Phil - NRCS, Fort Collins, CO
Subject: [mapserver-users] How to label only largest displayed areas?

Hi, All,

How can I label only the largest displayed areas within an extent? For example, 
if I'm labeling states of the United States and my extent covers a small region 
around the Maine, New Hampshire and Massachusetts junction, I only want a 
single label for each state, chosen by the largest displayed area (within the 
current map extent) in each state.

I'm using spatial data stored in Microsoft's SQL Server 2008.

I've created an enhancement request ticket (#4173: Define a current layer 
extent's WKT string for use in Data statement) as one possible approach, but 
this approach requires a change to MapServer.

Is there a better way?

Thanks.

- Phil Anzel
  Vistronix Inc for USDA/NRCS/ITC

This electronic message contains information generated by the USDA solely for 
the intended recipients.  Any unauthorized interception of this message or the 
use or disclosure of the information it contains may violate the law and 
subject the violator to civil or criminal penalties.  If you believe you have 
received this message in error, please notify the sender and delete the email 
immediately.


___
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] RE: How to label only largest displayed areas?

2012-02-03 Thread Rahkonen Jukka
Hi,

But still in this certain case the final select should sort by clipped size AND 
group by state name AND select the biggest feature from each group. Doesn't it 
feel easier to do with a database query and addional label layer? But how to 
pass the WMS BBOX for the database so it could do polygon intersections for 
getting the areas? And attributes should be transferred too so that clipped 
areas could be sorted by state name.

-Jukka Rahkonen-

> -Alkuperäinen viesti-
> Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
> [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
> Stephen Woodbridge
> Lähetetty: 3. helmikuuta 2012 16:44
> Vastaanottaja: mapserver-users@lists.osgeo.org
> Aihe: Re: [mapserver-users] RE: How to label only largest 
> displayed areas?
> 
> Phil,
> 
> In theory, it might be possible to do this by extending the 
> labelcache 
> code to save the clipped area size of each polygon or a 
> clipped length 
> of a line and then sort the labelcache items by size and label them. 
> MINDISTANCE could be applied to limit the number of labels using the 
> existing code. This behavior would need to be triggered by a 
> new LABEL 
> keyword maybe like PRIORITY [LARGEST|SMALLEST]
> 
> If you want to write an enhancement ticket for this in the 
> bug tracker 
> you can add my comment above, but I suspect that you would 
> have to fund 
> the development of this or provide a patch.
> 
> Best regards,
>-Steve W
> 
> On 2/3/2012 8:59 AM, Anzel, Phil - NRCS, Fort Collins, CO wrote:
> > Hi, Jukka and Steve,
> >
> > Thanks for your replies. Jukka is correct, I do not believe it is
> > simple. Steve, your approach sorts all areas and then filters by
> > those visible in the layer's extent. I'm looking for ranking by the
> > clipped area. For example, if the current map and layer's extent
> > shows the a small sliver of the mainland of California and a larger
> > visible part of an island that is part of California, only 
> the island
> > would be labeled, as its visible area is larger than that of the
> > sliver.
> >
> > - Phil
> >
> > -Original Message- From: Rahkonen Jukka
> > [mailto:jukka.rahko...@mmmtike.fi] Sent: Thursday, February 02, 2012
> > 4:01 PM To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort Collins,
> > CO; mapserver-users@lists.osgeo.org Subject: Re: How to label only
> > largest displayed areas?
> >
> > Hi,
> >
> > I understood that meaning was to put exactly one label per state.
> > Each state, even tiny ones, should be labeled. But one state should
> > get only one label even if the map window is splitting the state
> > polygon into two or more intersections. Those intersections may be
> > bigger than the tiny state. Not extremely simple.
> >
> > -Jukka-
> >
> >  L Lime, Steve D (DNR)
> > wrote:
> >
> >> I'd do this by sorting features based on area (ascending order).
> >> This would draw the smallest polygons first, but would put the
> >> labels for the shapes with the largest area into the label cache
> >> last (where they would be placed and drawn first). I've done this
> >> with labeling lakes and it works fine.
> >
> > Steve
> >
> > -Original Message- From:
> > mapserver-users-boun...@lists.osgeo.org
> > [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Anzel,
> > Phil - NRCS, Fort Collins, CO Sent: Thursday, February 02, 2012 1:43
> > PM To: mapserver-users@lists.osgeo.org Cc: Anzel, Phil - NRCS, Fort
> > Collins, CO Subject: [mapserver-users] How to label only largest
> > displayed areas?
> >
> > Hi, All,
> >
> > How can I label only the largest displayed areas within an extent?
> > For example, if I'm labeling states of the United States and my
> > extent covers a small region around the Maine, New Hampshire and
> > Massachusetts junction, I only want a single label for each state,
> > chosen by the largest displayed area (within the current map extent)
> > in each state.
> >
> > I'm using spatial data stored in Microsoft's SQL Server 2008.
> >
> > I've created an enhancement request ticket (#4173: Define a current
> > layer extent's WKT string for use in Data statement) as one possible
> > approach, but this approach requires a change to MapServer.
> >
> > Is there a better way?
> >
> > Thanks.
> >
> > - Phil Anzel Vistronix Inc for USDA/NRCS/ITC
> >
> > This electronic message contains information generated by the USDA
> > solely for the intended recipients.  Any unauthorized 
> interception of
> > this message or the use or disclosure of the information it contains
> > may violate the law and subject the violator to civil or criminal
> > penalties.  If you believe you have received this message in error,
> > please notify the sender and delete the email immediately.
> >
> >
> > ___ mapserver-users
> > mailing list mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
> > _

[mapserver-users] RE: How to label only largest displayed areas?

2012-02-03 Thread Lime, Steve D (DNR)
I interpreted differently, probably incorrectly. It would be helpful to see 
pictures with questions like this. I do think that sorting, plus label 
MINDISTANCE, plus label MINFEATURESIZE would probably produce useable results 
in most cases. 

The only other solution I can think of would be to clip features in the 
database. PostGIS has the !bbox! hack to allow this. I don't know if the other 
DBs also support it.

Steve

-Original Message-
From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] 
Sent: Thursday, February 02, 2012 5:01 PM
To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort Collins, CO; 
mapserver-users@lists.osgeo.org
Subject: Re: How to label only largest displayed areas?

Hi,

I understood that meaning was to put exactly one label per state. Each state, 
even tiny ones, should be labeled. But one state should get only one label even 
if the map window is splitting the state polygon into two or more 
intersections. Those intersections may be bigger than the tiny state. Not 
extremely simple.

-Jukka-


L Lime, Steve D (DNR) wrote:

> I'd do this by sorting features based on area (ascending order). This would 
> draw the smallest polygons first, but would put the labels for the shapes 
> with the largest area into the label cache last (where they would be placed 
> and drawn first). I've done this with labeling lakes and it works fine.

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Anzel, Phil - 
NRCS, Fort Collins, CO
Sent: Thursday, February 02, 2012 1:43 PM
To: mapserver-users@lists.osgeo.org
Cc: Anzel, Phil - NRCS, Fort Collins, CO
Subject: [mapserver-users] How to label only largest displayed areas?

Hi, All,

How can I label only the largest displayed areas within an extent? For example, 
if I'm labeling states of the United States and my extent covers a small region 
around the Maine, New Hampshire and Massachusetts junction, I only want a 
single label for each state, chosen by the largest displayed area (within the 
current map extent) in each state.

I'm using spatial data stored in Microsoft's SQL Server 2008.

I've created an enhancement request ticket (#4173: Define a current layer 
extent's WKT string for use in Data statement) as one possible approach, but 
this approach requires a change to MapServer.

Is there a better way?

Thanks.

- Phil Anzel
  Vistronix Inc for USDA/NRCS/ITC

This electronic message contains information generated by the USDA solely for 
the intended recipients.  Any unauthorized interception of this message or the 
use or disclosure of the information it contains may violate the law and 
subject the violator to civil or criminal penalties.  If you believe you have 
received this message in error, please notify the sender and delete the email 
immediately.


___
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] street round intersection, crossroads

2012-02-03 Thread Stephen Woodbridge
There is not trick to this, I have plenty of maps with roundabouts in 
them. You just have to digitize the the roundabout as segments. 
Mapserver just draws points, lines and polygons, what you are 
visualizing as a nice smooth circle is nothing more then a line with 
multiple vertices, a LINESTRING.


-Steve W

On 2/3/2012 8:51 AM, gabriel munteanu wrote:

Hi,

I would like to achieve in mapserver something like this google map:
http://maps.google.com/maps?q=Paris,+France&hl=en&ie=UTF8&ll=47.174895,-1.624206&spn=0.005594,0.012167&sll=44.437711,26.097367&sspn=0.376038,0.778656&t=m&z=17
Please notice the round crossroads.
Before I place my question, here is my setup.
the map editor: a custom openlayers tool.
It saves labels, lines, polygons through WFS-T with tinyows into a
postgres+postgis db.
a mapserver to render these vector features.
There are 2 questions:
1. As my starting point is raw satellite images, what would be the
best approach for the editor? Should I let him make only the lines for
the street and then I compute the intersections in the sql query in
the layer section of the mapserver? should i give him the possibility
to make a point at the intersection of the 2 lines on a different
layer? or maybe a regular polygon with many sides ?
2. Once I have the lines on the street layer and optional
point/regular polygon on the crossroads layer, how do I go about and
make it look like the google map shown at the link above ?
I will take as example the crossroads at Rue Eugene Pottier and Route
de Paimboeuf. Coming from North-East the thin red line acting as
border goes around in a nice curve and goes north to  Rue Eugene
Pottier [the border below goes south the same nice way]. and in the
middle there is a circle showing underneath layers with the same color
- thin red.

I didn't find any examples, or any mapserver map that can do this? Is
it even possible? Or is there a trick in STYLE section that can
achieve this result?

Thank you in advance,
Gabi
___
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] RE: How to label only largest displayed areas?

2012-02-03 Thread Stephen Woodbridge

Phil,

In theory, it might be possible to do this by extending the labelcache 
code to save the clipped area size of each polygon or a clipped length 
of a line and then sort the labelcache items by size and label them. 
MINDISTANCE could be applied to limit the number of labels using the 
existing code. This behavior would need to be triggered by a new LABEL 
keyword maybe like PRIORITY [LARGEST|SMALLEST]


If you want to write an enhancement ticket for this in the bug tracker 
you can add my comment above, but I suspect that you would have to fund 
the development of this or provide a patch.


Best regards,
  -Steve W

On 2/3/2012 8:59 AM, Anzel, Phil - NRCS, Fort Collins, CO wrote:

Hi, Jukka and Steve,

Thanks for your replies. Jukka is correct, I do not believe it is
simple. Steve, your approach sorts all areas and then filters by
those visible in the layer's extent. I'm looking for ranking by the
clipped area. For example, if the current map and layer's extent
shows the a small sliver of the mainland of California and a larger
visible part of an island that is part of California, only the island
would be labeled, as its visible area is larger than that of the
sliver.

- Phil

-Original Message- From: Rahkonen Jukka
[mailto:jukka.rahko...@mmmtike.fi] Sent: Thursday, February 02, 2012
4:01 PM To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort Collins,
CO; mapserver-users@lists.osgeo.org Subject: Re: How to label only
largest displayed areas?

Hi,

I understood that meaning was to put exactly one label per state.
Each state, even tiny ones, should be labeled. But one state should
get only one label even if the map window is splitting the state
polygon into two or more intersections. Those intersections may be
bigger than the tiny state. Not extremely simple.

-Jukka-

 L Lime, Steve D (DNR)
wrote:


I'd do this by sorting features based on area (ascending order).
This would draw the smallest polygons first, but would put the
labels for the shapes with the largest area into the label cache
last (where they would be placed and drawn first). I've done this
with labeling lakes and it works fine.


Steve

-Original Message- From:
mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Anzel,
Phil - NRCS, Fort Collins, CO Sent: Thursday, February 02, 2012 1:43
PM To: mapserver-users@lists.osgeo.org Cc: Anzel, Phil - NRCS, Fort
Collins, CO Subject: [mapserver-users] How to label only largest
displayed areas?

Hi, All,

How can I label only the largest displayed areas within an extent?
For example, if I'm labeling states of the United States and my
extent covers a small region around the Maine, New Hampshire and
Massachusetts junction, I only want a single label for each state,
chosen by the largest displayed area (within the current map extent)
in each state.

I'm using spatial data stored in Microsoft's SQL Server 2008.

I've created an enhancement request ticket (#4173: Define a current
layer extent's WKT string for use in Data statement) as one possible
approach, but this approach requires a change to MapServer.

Is there a better way?

Thanks.

- Phil Anzel Vistronix Inc for USDA/NRCS/ITC

This electronic message contains information generated by the USDA
solely for the intended recipients.  Any unauthorized interception of
this message or the use or disclosure of the information it contains
may violate the law and subject the violator to civil or criminal
penalties.  If you believe you have received this message in error,
please notify the sender and delete the email immediately.


___ 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


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


[mapserver-users] RE: How to label only largest displayed areas?

2012-02-03 Thread Anzel, Phil - NRCS, Fort Collins, CO
Steve W,

Thanks for the MINDISTANCE suggestion; I'll give that a go to get part way 
there, along with to Steve L.'s suggestion to sort. Still not quite at the goal 
yet. 

- Phil

-Original Message-
From: Anzel, Phil - NRCS, Fort Collins, CO 
Sent: Friday, February 03, 2012 7:00 AM
To: mapserver-users@lists.osgeo.org; Anzel, Phil - NRCS, Fort Collins, CO
Subject: RE: How to label only largest displayed areas?

Hi, Jukka and Steve,

Thanks for your replies. Jukka is correct, I do not believe it is simple. 
Steve, your approach sorts all areas and then filters by those visible in the 
layer's extent. I'm looking for ranking by the clipped area. For example, if 
the current map and layer's extent shows the a small sliver of the mainland of 
California and a larger visible part of an island that is part of California, 
only the island would be labeled, as its visible area is larger than that of 
the sliver.

- Phil

-Original Message-
From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] 
Sent: Thursday, February 02, 2012 4:01 PM
To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort Collins, CO; 
mapserver-users@lists.osgeo.org
Subject: Re: How to label only largest displayed areas?

Hi,

I understood that meaning was to put exactly one label per state. Each state, 
even tiny ones, should be labeled. But one state should get only one label even 
if the map window is splitting the state polygon into two or more 
intersections. Those intersections may be bigger than the tiny state. Not 
extremely simple.

-Jukka-


L Lime, Steve D (DNR) wrote:

> I'd do this by sorting features based on area (ascending order). This would 
> draw the smallest polygons first, but would put the labels for the shapes 
> with the largest area into the label cache last (where they would be placed 
> and drawn first). I've done this with labeling lakes and it works fine.

Steve


Date: Thu, 02 Feb 2012 15:19:19 -0500
From: Stephen Woodbridge 
Subject: Re: [mapserver-users] How to label only largest displayed areas?
To: mapserver-users@lists.osgeo.org
Message-ID: <4f2aefc7.5020...@swoodbridge.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Phil,

I'm not sure I understand what you need here. Mapserver currently 
displays one label per polygon based on the visible extents of that 
polygon. If your state is represented by a single record with a 
multipolygon like the state and its coastal islands, then I suspect that 
it will label the first polygon in the multipolygon object. In the cases 
where you have multiple records in your dataset one for the state and 
additional polygons for the islands, then all of these are added to the 
labelcache and the last one in the labelcache is labeled first if the 
label does not collide. So in this case you could sort your data by 
state and area increasing in size so you largest is loaded last and 
labeled first.

You can also control the number of labels using MINDISTANCE  so 
the same label in a layer is not presented within  units of 
another with the same name.

Do you need more than this?
Are you trying to place the label in the biggest open space? (this we 
can not do because there is no easy algorithm for this).

-Steve W

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Anzel, Phil - 
NRCS, Fort Collins, CO
Sent: Thursday, February 02, 2012 1:43 PM
To: mapserver-users@lists.osgeo.org
Cc: Anzel, Phil - NRCS, Fort Collins, CO
Subject: [mapserver-users] How to label only largest displayed areas?

Hi, All,

How can I label only the largest displayed areas within an extent? For example, 
if I'm labeling states of the United States and my extent covers a small region 
around the Maine, New Hampshire and Massachusetts junction, I only want a 
single label for each state, chosen by the largest displayed area (within the 
current map extent) in each state.

I'm using spatial data stored in Microsoft's SQL Server 2008.

I've created an enhancement request ticket (#4173: Define a current layer 
extent's WKT string for use in Data statement) as one possible approach, but 
this approach requires a change to MapServer.

Is there a better way?

Thanks.

- Phil Anzel
  Vistronix Inc for USDA/NRCS/ITC

This electronic message contains information generated by the USDA solely for 
the intended recipients.  Any unauthorized interception of this message or the 
use or disclosure of the information it contains may violate the law and 
subject the violator to civil or criminal penalties.  If you believe you have 
received this message in error, please notify the sender and delete the email 
immediately.


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


__

[mapserver-users] RE: How to label only largest displayed areas?

2012-02-03 Thread Anzel, Phil - NRCS, Fort Collins, CO
Hi, Jukka and Steve,

Thanks for your replies. Jukka is correct, I do not believe it is simple. 
Steve, your approach sorts all areas and then filters by those visible in the 
layer's extent. I'm looking for ranking by the clipped area. For example, if 
the current map and layer's extent shows the a small sliver of the mainland of 
California and a larger visible part of an island that is part of California, 
only the island would be labeled, as its visible area is larger than that of 
the sliver.

- Phil

-Original Message-
From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] 
Sent: Thursday, February 02, 2012 4:01 PM
To: Lime, Steve D (DNR); Anzel, Phil - NRCS, Fort Collins, CO; 
mapserver-users@lists.osgeo.org
Subject: Re: How to label only largest displayed areas?

Hi,

I understood that meaning was to put exactly one label per state. Each state, 
even tiny ones, should be labeled. But one state should get only one label even 
if the map window is splitting the state polygon into two or more 
intersections. Those intersections may be bigger than the tiny state. Not 
extremely simple.

-Jukka-


L Lime, Steve D (DNR) wrote:

> I'd do this by sorting features based on area (ascending order). This would 
> draw the smallest polygons first, but would put the labels for the shapes 
> with the largest area into the label cache last (where they would be placed 
> and drawn first). I've done this with labeling lakes and it works fine.

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Anzel, Phil - 
NRCS, Fort Collins, CO
Sent: Thursday, February 02, 2012 1:43 PM
To: mapserver-users@lists.osgeo.org
Cc: Anzel, Phil - NRCS, Fort Collins, CO
Subject: [mapserver-users] How to label only largest displayed areas?

Hi, All,

How can I label only the largest displayed areas within an extent? For example, 
if I'm labeling states of the United States and my extent covers a small region 
around the Maine, New Hampshire and Massachusetts junction, I only want a 
single label for each state, chosen by the largest displayed area (within the 
current map extent) in each state.

I'm using spatial data stored in Microsoft's SQL Server 2008.

I've created an enhancement request ticket (#4173: Define a current layer 
extent's WKT string for use in Data statement) as one possible approach, but 
this approach requires a change to MapServer.

Is there a better way?

Thanks.

- Phil Anzel
  Vistronix Inc for USDA/NRCS/ITC

This electronic message contains information generated by the USDA solely for 
the intended recipients.  Any unauthorized interception of this message or the 
use or disclosure of the information it contains may violate the law and 
subject the violator to civil or criminal penalties.  If you believe you have 
received this message in error, please notify the sender and delete the email 
immediately.


___
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


[mapserver-users] street round intersection, crossroads

2012-02-03 Thread gabriel munteanu
Hi,

I would like to achieve in mapserver something like this google map:
http://maps.google.com/maps?q=Paris,+France&hl=en&ie=UTF8&ll=47.174895,-1.624206&spn=0.005594,0.012167&sll=44.437711,26.097367&sspn=0.376038,0.778656&t=m&z=17
Please notice the round crossroads.
Before I place my question, here is my setup.
the map editor: a custom openlayers tool.
It saves labels, lines, polygons through WFS-T with tinyows into a
postgres+postgis db.
a mapserver to render these vector features.
There are 2 questions:
1. As my starting point is raw satellite images, what would be the
best approach for the editor? Should I let him make only the lines for
the street and then I compute the intersections in the sql query in
the layer section of the mapserver? should i give him the possibility
to make a point at the intersection of the 2 lines on a different
layer? or maybe a regular polygon with many sides ?
2. Once I have the lines on the street layer and optional
point/regular polygon on the crossroads layer, how do I go about and
make it look like the google map shown at the link above ?
I will take as example the crossroads at Rue Eugene Pottier and Route
de Paimboeuf. Coming from North-East the thin red line acting as
border goes around in a nice curve and goes north to  Rue Eugene
Pottier [the border below goes south the same nice way]. and in the
middle there is a circle showing underneath layers with the same color
- thin red.

I didn't find any examples, or any mapserver map that can do this? Is
it even possible? Or is there a trick in STYLE section that can
achieve this result?

Thank you in advance,
Gabi
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Mapfile Generators

2012-02-03 Thread Paul Maddock
Hi all,

Are there any extensions of ArcView 10 which I can export .shp files into 
mapfiles or possibly any other open source mapfile generators?  It seems time 
consuming to manually create these map files if I have a large collection of 
shapefiles.

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


Re: [mapserver-users] WFS GetCapabilities does not work with non-ascii characters in mapfile

2012-02-03 Thread Rahkonen Jukka
Hi,

Thank you for the information. I had a try by converting my Windows mapfile 
with iconv by using parameters -f ISO-8859-1 -t UTF-8. Now WFS GetCapabilities 
did not get truncated and it shows right:

test_ö
However, WMS GetCapabilities is a bit odd if "wms_title" is also given UTF-8 
encoded.

test_ö

I can make both look right by using UTF-8 encoding for "wfs_title" and 
ISO-8859-1 encoding for "wms_title" inside the same mapfile. In a way funny but 
not very convenient situation. 

-Jukka Rahkonen-


Eichner, Andreas - SID-NLKM wrote:

> 
> This is due to the usage of libXML2. Its internal data format 
> is UTF-8 and MapServer has no way to deal with different map 
> file encodings. Therefore libXML2 aborts due to invalid UTF-8 
> input data on serialization. Transcode your map file to UTF-8 
> and it should work.
> Note that libXML2 is _not_ used for WMS and older WFS 
> services. These use plain fprintf() to write data out as is. 
> So you might encounter crazy things when trying to use 
> different encodings on data, map file and web server output.
> 
> 
> > -Ursprüngliche Nachricht-
> > Von: mapserver-users-boun...@lists.osgeo.org 
> > [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag 
> > von Rahkonen Jukka
> > Gesendet: Freitag, 3. Februar 2012 10:24
> > An: 'mapserver-users@lists.osgeo.org'
> > Betreff: [mapserver-users] WFS GetCapabilities does not work 
> > with non-ascii characters in mapfile
> > 
> > Hi,
> >  
> > This should be simple to test and verify.
> > Write into WEB METADATA parameters
> >  
> >  "wms_title" "test_ö"
> >  "wfs_title" "test_ö"
> >  
> > WMS 1.1.1 GetGapabilities does not have any trouble with "ö" 
> > and request sends back
> > ...
> > 
> >   OGC:WMS
> >   test_ö
> > 
> >  
> > However, WFS GetCapabilities response gets truncated. All 
> > that Mapserver sends is this
> >  
> > 
> > http://www.opengis.net/gml"; 
> > xmlns:wfs="http://www.opengis.net/wfs"; 
> > xmlns:ows="http://www.opengis.net/ows"; 
> > xmlns:xlink="http://www.w3.org/1999/xlink"; 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > xmlns:ogc="http://www.opengis.net/ogc"; 
> > xmlns="http://www.opengis.net/wfs"; version="1.1.0" 
> > xsi:schemaLocation="http://www.opengis.net/wfs 
> > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>
> >   
> > test_
> >  
> >  
> > The same error occurs if non-ascii characters are used in 
> > "wfs_abstract". 
> > I was testing on Windows and Mapserver 6.0.1.
> >  
> > -Jukka Rahkonen
> > 
> ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


AW: [mapserver-users] WFS GetCapabilities does not work with non-ascii characters in mapfile

2012-02-03 Thread Eichner, Andreas - SID-NLKM

This is due to the usage of libXML2. Its internal data format is UTF-8 and 
MapServer has no way to deal with different map file encodings. Therefore 
libXML2 aborts due to invalid UTF-8 input data on serialization. Transcode your 
map file to UTF-8 and it should work.
Note that libXML2 is _not_ used for WMS and older WFS services. These use plain 
fprintf() to write data out as is. So you might encounter crazy things when 
trying to use different encodings on data, map file and web server output.


> -Ursprüngliche Nachricht-
> Von: mapserver-users-boun...@lists.osgeo.org 
> [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag 
> von Rahkonen Jukka
> Gesendet: Freitag, 3. Februar 2012 10:24
> An: 'mapserver-users@lists.osgeo.org'
> Betreff: [mapserver-users] WFS GetCapabilities does not work 
> with non-ascii characters in mapfile
> 
> Hi,
>  
> This should be simple to test and verify.
> Write into WEB METADATA parameters
>  
>  "wms_title" "test_ö"
>  "wfs_title" "test_ö"
>  
> WMS 1.1.1 GetGapabilities does not have any trouble with "ö" 
> and request sends back
> ...
> 
>   OGC:WMS
>   test_ö
> 
>  
> However, WFS GetCapabilities response gets truncated. All 
> that Mapserver sends is this
>  
> 
> http://www.opengis.net/gml"; 
> xmlns:wfs="http://www.opengis.net/wfs"; 
> xmlns:ows="http://www.opengis.net/ows"; 
> xmlns:xlink="http://www.w3.org/1999/xlink"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xmlns:ogc="http://www.opengis.net/ogc"; 
> xmlns="http://www.opengis.net/wfs"; version="1.1.0" 
> xsi:schemaLocation="http://www.opengis.net/wfs 
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>
>   
> test_
>  
>  
> The same error occurs if non-ascii characters are used in 
> "wfs_abstract". 
> I was testing on Windows and Mapserver 6.0.1.
>  
> -Jukka Rahkonen
> 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] WFS GetCapabilities does not work with non-ascii characters in mapfile

2012-02-03 Thread Rahkonen Jukka
Hi,

This should be simple to test and verify.
Write into WEB METADATA parameters

 "wms_title" "test_ö"
 "wfs_title" "test_ö"

WMS 1.1.1 GetGapabilities does not have any trouble with "ö" and request sends 
back
...

  OGC:WMS
  test_ö


However, WFS GetCapabilities response gets truncated. All that Mapserver sends 
is this


http://www.opengis.net/gml"; 
xmlns:wfs="http://www.opengis.net/wfs"; xmlns:ows="http://www.opengis.net/ows"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ogc="http://www.opengis.net/ogc"; xmlns="http://www.opengis.net/wfs"; 
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>
  
test_


The same error occurs if non-ascii characters are used in "wfs_abstract".
I was testing on Windows and Mapserver 6.0.1.

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


[mapserver-users] Legend size problem in GetLegendGraphic request

2012-02-03 Thread Dejan Gambin
Hi,

I have point shapefile and trying to show the points as big circles on the map. 
So I am using something like:

...
SIZEUNITS kilometers
CLASS
  Name "myname"
  SIZE 10
  ...
END
...

Everything is show ok on the map but the symbol in the legend is very big, and 
exceeds the symbol key box very much, although KEYSIZE is set to 25 18.

Btw, I am using WMS GetLegendGraphic request for getting the legend

Thanks very much

regards, dejan___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PostGIS Connection String - Thread Issue?

2012-02-03 Thread thomas bonfort
There were some changes to string quoting/escaping in version 6 (I think).

Are the errors you are seeing intermittent, or is it reproducible
consistently on all requests?
What happens if you use

CONNECTION "dbname=interlocken user=interlocken ..."

instead of

CONNECTION "dbname='interlocken' user='interlocken' ..."

--
thomas

On Thu, Feb 2, 2012 at 23:00, Trent Pingenot  wrote:
> Hi list,
>
> We recently upgraded from MapServer 5.x to 6.0.1 on Linux.  We have 21 sites
> running all running smoothly with identical configurations off this server.
> On one site the MapServer connection to Postgres/PostGIS fails on all
> layers.  The MS debug message is as follows
>
> [Thu Feb  2 14:41:04 2012].823297 msPostGISLayerOpen(): Query error.
> Database connection failed (FATAL:  no pg_hba.conf entry for host "[local]",
> user "interlocken", database "nterlocNken", SSL off
> ) with connect string 'dbname='nterlocNken' user='interlocken'
> password=***'
>
> And the entry in the map file
>
> CONNECTIONTYPE postgis
> PROCESSING "CLOSE_CONNECTION=DEFER"
> CONNECTION "dbname='interlocken' user='interlocken'
> password='**'"
> DATA 'the_geom FROM "ext_lighting_existing_point" USING UNIQUE gid USING
> srid=4326'
>
> I can log into psql on the server as the interlocken user and hit the DB
> just fine so it's not the pg_hba.conf file settings which are set that the
> db username and db name must match.  My question is why
> does the dbname get corrupted to nterlocNken? Is this a bug or how mapserver
> should present the connection items in a debug statement?  I can use our old
> copy 5.4 copy of mapserver and it runs the map file fine.  One difference in
> this build is that we don't have the --with-threads support. We are looking
> at getting the build rebuilt with this thread locking option included.
> Could threading be the problem? I'm not sure how/if threading might be
> related but thought I would mention it.
>
> I've stripped out all layers from the mapfile except a single test layer.
> I've got 60+ layers running in other map files and databases with identical
> setups  on the same server without problems, why this one?  We even tried
> wiping out the DB and associated user and reloading and still the same
> problem.
>
> Thanks in advance for any help or tips you can provide.
>
> Thanks,
>
> Trent
>
> ___
> 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] Using WFS gml_[item name]_alias

2012-02-03 Thread Dejan Gambin
Hi,

I am trying to use gml_[item name]_alias for renaming my columns in wfs 
GetFeature request with gml output. Everything works fine except I can't use 
some characters like whitespace for example, because it is not a valid xml 
element.

My question is - is there any way to name my attribute like "my attribute" 
through WFS GetFeature request? 

Btw, I am presenting the result in a html table, so would be useful, for 
example, to be able to handle this and other stuff like type for example 
(integer, string, ..) through the mapfile. And maybe to use this on the client 
to align data in a table (numbers right, string left, etc.)

Thanks very much on any useful info

regards, dejan___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users