[mapserver-users] Map Server newbee looking help for php-mapscript

2008-02-27 Thread mia khusnuk khotimah
is there anyone could help me? i try to make a map with simple function like 
zoom in and out, pan and query. 
everythings going well except the query function. i cant reach the basic 
concept of using "querybypoint" function, how to use it and how will the 
sentence be.
could anyone help me with this? online references of maybe advice? 
thanks.

mia




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic mapping with CGI parameters

2008-02-27 Thread Roberto Bianconi
Hello Colin,

I'm probably missing something, but I don't see the problem with Approach #1.
It gives you total control on your application.

Conceptually, I would put something like this (not tested) in a CGI script.

#!/usr/bin/perl

use CGI;
my $q = new CGI;

# Get the parameters from the CGI
my $someUserId = $q->param('userid');
my $lon = $q->param('lon');
my $lat = $q->param('lat');
# ...

# Write a mapfile (a temporary one using userid in the name) using
also the parameters from the CGI
my $mapfile = '/tmp_path/'.$someUserId.'.map';
open (MAP,">$mapfile);
print MAP "MAP\n";
print MAP"STATUS ON\n";
# 
# other mapfile stuff, including printing your DATA block substituting
the user id
print MAP "
DATA \"line FROM (
SELECT num, id, line
FROM jsview_journeyroutes
WHERE us_id = $someUserId
  ) AS foo USING UNIQUE id USING SRID=4326\"
\n"';
# 
print MAP "END\n";
close (MAP);

# Reload the mapfile
my $mapObj = new mapscript::mapObj($mapFile);

my $img = $map->prepareImage();

# Do whatever you want (load and draw layers from the mapfile
# and/or create/draw new ones), for example

my $layer = $map->getLayerByName('one_of_my_layers_in_mapfile');
$layer->draw($map, $img); #

# And then prepare and save the image

my $image_file = '/path/whatever.png';
$img->save($image_file);

# Here we're ready to print the HTML response to the browser (image generated
above and input forms + submit button to get new parameters and
generate a new image)

print $q->header();
print $q->start_html();
#
# Whatever you want to put in your page here, including the generated image
print $q->img($imagefile);

print $q->end_html();


The only sure thing is that I'd use CGI.pm module for writing CGI applications.
It is much, much easier and SAFER than anything you can write from
scratch, guaranteed :))

Hope this helps
Roberto

http ://www.enviroware.com


On Tue, Feb 26, 2008 at 9:16 PM, Colin Wetherbee <[EMAIL PROTECTED]> wrote:
> Greetings.
>
>  I have a fledgling MapServer application that uses PostgreSQL as its
>  back-end.  Each set of data I would like to retrieve from PostgreSQL is
>  specific to a certain user.  Currently, since the application is only in
>  an alpha phase, I have MapServer retrieve the aggregate sum of the data
>  in the database and display it on my map.  This isn't going to work for
>  the real application, since different users need to see different sets
>  of data.
>
>  I would like to do one of two things, but I've been poring over the
>  documentation today and can't find any way to achieve either.  I would
>  very much appreciate some assistance.  My two approaches are as follows,
>  but if there are others, I would certainly be open to implementing
>  something different.
>
>  Approach #1:
>
>  Since my application is written in Perl, I could use MapScript in Perl
>  to generate bits of maps and return them to the browser as needed.  Perl
>  would interpret cookies and perform session authentication before
>  generating a customized map file to pass along to MapServer.  The Perl
>  code [0] would look something like:
>
>  sub GetMapPiece()
>  {
>$req = new mapscript::OWSRequest();
>$req->setParameter("SERVICE", "WMS");
>$req->setParameter("VERSION", "1.1.0");
>$req->setParameter("REQUEST", $something);
>
># The next two lines are the important ones...
>my $mapFile = GenerateMapFile({ userid => $someUserId });
>my $mapObj = new mapscript::mapObj($mapFile);
>
>mapscript::msIO_installStdoutToBuffer();
>my $dispatch_out = $map->OWSDispatch($req);
>return mapscript::msIO_getStdoutBufferString();
>  }
>
>  The problem with this is that, as far as I can tell, I can't create a
>  mapObj from anything other than a file on disk.  I would like $mapFile
>  to contain the full text of a dynamically created map file, and I would
>  then like to be able to create a new mapObj from it.  My imaginary
>  GenerateMapFile() function would generate the text for the map file, but
>  it would never be saved to disk.
>
>  Approach #2:
>
>  This would be my preferred method, but from what I've read, I think
>  approach #1 is more likely to happen.
>
>  This approach entails passing a CGI parameter to mapserv that could be
>  substituted somewhere in the map file.  For example, the URL could be:
>
>  http://example.com/cgi-bin/mapserv?userid=1234
>
>  Then, the map file could contain something like:
>
>  DATA "line FROM (
>  SELECT num, id, line
>  FROM jsview_journeyroutes
>  WHERE us_id = {userid}
>) AS foo USING UNIQUE id USING SRID=4326"
>
>  And, MapServer would see "WHERE us_id = {userid}" and, for {userid},
>  substitute the 1234 that was passed into mapserv as a CGI parameter.
>
>  Of course, doing this directly would cause nasty SQL injection attack
>  problems, but I could properly sanitize the input with Perl.  No big
>  deal there.
>
>  End Approaches.
>
>  Any thoughts on this?
>
>  Thanks.
>
>  C

[MAPSERVER-USERS] Excluding layers from WMS

2008-02-27 Thread Pål Kristensen

Hi!

Is there any news on the exclude layers from WMS issue which is discussed in
this tread?
http://www.nabble.com/Excluding-certain-layer-types-from-WMS...-to14786841.html#a14813767

I really like the idea of a wms_exclude_layer keyword in the layer.metadata
block

Regards,
Pål Kristensen
-- 
View this message in context: 
http://www.nabble.com/Excluding-layers-from-WMS-tp15710216p15710216.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] Advice for MapServer project

2008-02-27 Thread Fawcett, David
Tim, 

Take a look at the PostGIS workshop from the 2005 conference.  
http://mapserver.gis.umn.edu/community/conferences/MUM3/workshop/postgis/

Paul did an excellent job with it and I still think that it is a great primer.  

David.


-Original Message-
From: [EMAIL PROTECTED] on behalf of Timothy Mashford
Sent: Wed 2/27/2008 1:44 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Advice for MapServer project
 
Thanks to everyone for their input.

I have seen OpenLayers, I am not sure it is suitable as I really
require a zoom-box tool (not shift-click), and also a separate layer
control.

I have found GeoMoose to be fairly slow(?), and also full of features
I don't require (e.g. slide zoom), although I guess these could be
removed. The Morton County example is good.

The reason I was thinking dbox.js was that it is fast & simple. But
once I get up to that stage I will investigate all options.

Can someone just help me understand how the postgresql database could
be queried for data within a specific date range? I am thinking that
the user could specify the dates in an initialisation page, and these
dates could then be stored at hidden CGI variables (or javascript
variables?). But if the data sources are specified in the mapfile, how
do I pass the dates to postgresql?

Sorry if my lack of knowledge is showing... Thanks again for the responses.

Tim Mashford.
___
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] Advice for MapServer project

2008-02-27 Thread Richard Greenwood
On Wed, Feb 27, 2008 at 12:44 AM, Timothy Mashford <[EMAIL PROTECTED]> wrote:

>  Can someone just help me understand how the postgresql database could
>  be queried for data within a specific date range? I am thinking that
>  the user could specify the dates in an initialisation page, and these
>  dates could then be stored at hidden CGI variables (or javascript
>  variables?). But if the data sources are specified in the mapfile, how
>  do I pass the dates to postgresql?


There are a couple mechanisms. CGI MapServer has a mode=itemnquery
which accepts a query string. Here's an example:

http://www2.tetonwyo.org/mapserver/mapserv?
  mode=itemnquery
 &qitem=pidn
 &qstring=22-41-16-32-4-41-011
 &qlayer=ownership_spatial
 &mapext=shapes
 &savequery=true

This mode will highlight objects meeting the query criteria, and will
'zoom' the map to minimum bounding rectangle of the select objects.

Another way that I use is to pass the query into the map file with
parameter substitution, for example, in the map file a layer defined
something like:

Layer
   . . .
   CONNECTIONTYPE postgis
   CONNECTION "user=abc password=xyz dbname=pgDB host=localhost"
   FILTER "%datefilter%"
   DATA "the_geom FROM ownership_view USING SRID=2241 USING UNIQUE gid"
   . . .
END

And your query string would look something like:
   datefilter=(date BETWEEN 9/1/1955 AND 9/1/1965)
That probably needs quoted/escaped, but the point is that the map file
FILTER keyword can apply a query and that the %parameter% syntax
transfer a parameter from a URL query string into a map file.

dBox is a good, stable tool which I have used for years. But that's
not to suggest that it is better than OpenLayers, GeoMoose,
MapBuilder, etc.

Note also that via OGR MapServer can read MapInfo .TAB vector files.

Rich

-- 
Richard Greenwood
[EMAIL PROTECTED]
www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [MAPSERVER-USERS] WMS - GetCapabilities and version

2008-02-27 Thread Kralidis,Tom [Burlington]
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Pål Kristensen
> Sent: 26 February, 2008 3:56 PM
> To: mapserver-users@lists.osgeo.org
> Subject: [MAPSERVER-USERS] WMS - GetCapabilities and version
> 
> 
> Hi!
> 
> I did a build of mapserver nightly this evening and noticed 
> some changed WMS behavior compared to my last build (approx 2 
> months ago). The old build does reply to at GetCapabilities 
> request that misses the version parameter with a version 
> 1.1.1 capabilities xml-file. The new build fails withe an 
> error message that says that the version parameter is 
> missing. According to the WMS 1.1.1 standard version is a 
> mandatory parameter so the new behavior is correct according 
> to the standard. Unfortunately many of the clients around do 
> not comply with the standard, and of course the server gets the blame.
> 
> I guess this issue fall into the ongoing compliance 
> discussion (RFC-35). But what has changed over the last 
> couple of month that introduced this new behavior, and is 
> there some keywords that can be set to achieve the old behavior?

Fixed.  http://trac.osgeo.org/mapserver/ticket/2528 Thanks for catching this.

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


Re: [mapserver-users] Advice for MapServer project

2008-02-27 Thread Milo van der Linden

Timothy Mashford schreef:

Thanks to everyone for their input.

I have seen OpenLayers, I am not sure it is suitable as I really
require a zoom-box tool (not shift-click), and also a separate layer
control.
  
The zoombox tool is available. Please check 
http://www.openlayers.org/dev/examples/controls.html, there is a zoombox 
button (just above the pan hand). Click it and start dragging.

I have found GeoMoose to be fairly slow(?), and also full of features
I don't require (e.g. slide zoom), although I guess these could be
removed. The Morton County example is good.

The reason I was thinking dbox.js was that it is fast & simple. But
once I get up to that stage I will investigate all options.
  
I don't know about GeoMoose, but in Openlayers you can retrieve all 
layers at once from a mapserver, or you can add layers through 
javascript. The second will speed up drawing the map because layers will 
be sequentially loaded. If your base layer is fast, users will get the 
idea the whole map is faster.


Another thing is that in OpenLayers you can use tiled and untiled for 
your WMS server. Tiled means your mapwindow (+ an extra invisible 
border) is split in 9 pieces. These pieces are loaded sequential. 
Untiled means that a single image is retrieved from mapserver. You can 
mix the both. Say that you load the big topograhic map tiled and your 
own smaller datasets untiled. It will give a nice speedy feel. The extra 
border has the effect that when you pan half a mapwindow to the side, 
the data is already loaded. Again, another way to give user-experience a 
feeling of speed.

Can someone just help me understand how the postgresql database could
be queried for data within a specific date range? I am thinking that
the user could specify the dates in an initialisation page, and these
dates could then be stored at hidden CGI variables (or javascript
variables?). But if the data sources are specified in the mapfile, how
do I pass the dates to postgresql?
  

Date/Time functions for postgres are described here:


DATA "the_geom FROM (
  SELECT this, that, other, the_geom
  FROM my_daterange_table_with_geometry
  WHERE mydateColumnValue < %someDatefromOpenlayers% and 
mydateColumnValue > %someDatefromOpenlayers% - integer '30'

) AS foo USING UNIQUE id USING SRID=4326"

(Example on how to get a time-frame of 30 days around a given date.)

Sorry if my lack of knowledge is showing... Thanks again for the responses.

Tim Mashford.
___
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] WMS - GetCapabilities and version

2008-02-27 Thread Pål Kristensen

Hi!

Thanks! I will do a new build tomorrow. I really appreciate the quick
response.

Regards,
Pål Kristensen



Kralidis,Tom [Burlington] wrote:
> 
>  
> 
>> -Original Message-
>> From: [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] On Behalf Of 
>> Pål Kristensen
>> Sent: 26 February, 2008 3:56 PM
>> To: mapserver-users@lists.osgeo.org
>> Subject: [MAPSERVER-USERS] WMS - GetCapabilities and version
>> 
>> 
>> Hi!
>> 
>> I did a build of mapserver nightly this evening and noticed 
>> some changed WMS behavior compared to my last build (approx 2 
>> months ago). The old build does reply to at GetCapabilities 
>> request that misses the version parameter with a version 
>> 1.1.1 capabilities xml-file. The new build fails withe an 
>> error message that says that the version parameter is 
>> missing. According to the WMS 1.1.1 standard version is a 
>> mandatory parameter so the new behavior is correct according 
>> to the standard. Unfortunately many of the clients around do 
>> not comply with the standard, and of course the server gets the blame.
>> 
>> I guess this issue fall into the ongoing compliance 
>> discussion (RFC-35). But what has changed over the last 
>> couple of month that introduced this new behavior, and is 
>> there some keywords that can be set to achieve the old behavior?
> 
> Fixed.  http://trac.osgeo.org/mapserver/ticket/2528 Thanks for catching
> this.
> 
> ..Tom
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/WMS---GetCapabilities-and-version-tp15699789p15714611.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] Advice for MapServer project

2008-02-27 Thread Obe, Regina
If you are checking out postgis tutorials, you might want to look at the
2007 workshop Paul did of similar vain.  The way you do things in
PostGIS and Mapserver has changed a bit between 2005 and 2007 so you
might develop some bad habits looking at the older tutorial.

http://www.foss4g2007.org/workshops/W-04/

Hope that helps,
Regina
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Fawcett,
David
Sent: Wednesday, February 27, 2008 8:42 AM
To: Timothy Mashford; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Advice for MapServer project

Tim, 

Take a look at the PostGIS workshop from the 2005 conference.
http://mapserver.gis.umn.edu/community/conferences/MUM3/workshop/postgis
/

Paul did an excellent job with it and I still think that it is a great
primer.  

David.


-Original Message-
From: [EMAIL PROTECTED] on behalf of Timothy
Mashford
Sent: Wed 2/27/2008 1:44 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Advice for MapServer project
 
Thanks to everyone for their input.

I have seen OpenLayers, I am not sure it is suitable as I really
require a zoom-box tool (not shift-click), and also a separate layer
control.

I have found GeoMoose to be fairly slow(?), and also full of features
I don't require (e.g. slide zoom), although I guess these could be
removed. The Morton County example is good.

The reason I was thinking dbox.js was that it is fast & simple. But
once I get up to that stage I will investigate all options.

Can someone just help me understand how the postgresql database could
be queried for data within a specific date range? I am thinking that
the user could specify the dates in an initialisation page, and these
dates could then be stored at hidden CGI variables (or javascript
variables?). But if the data sources are specified in the mapfile, how
do I pass the dates to postgresql?

Sorry if my lack of knowledge is showing... Thanks again for the
responses.

Tim Mashford.
___
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
-
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

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


Re: [mapserver-users] Re: Query Regrading Map Server

2008-02-27 Thread Brent Fraser
Kunal,

  If OpenGL is a strict requirement, you may want to look at
VTP (www.vterrain.org), or ossimPlanet (www.ossim.org).
Neither allow editing of map data but you can add/delete
layers.  I think they will do the other requirements you
listed.

Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta

- Original Message - 
From: "Kunal Malik" <[EMAIL PROTECTED]>
To: "vishal nagpal" <[EMAIL PROTECTED]>
Cc: 
Sent: Tuesday, February 26, 2008 10:54 PM
Subject: [mapserver-users] Re: Query Regrading Map Server


> Hi Vishal!!
> 1.
> As far as the compatibilty with the opengl is concerned i
am asking this
> because my display module is made on opengl and i have to
display the raster
> & the vector image on it.
> 2.
> we don't have to use the web-server as our application
will run on intranet
> ..we want that mapserver to interact with opengl..
> 32 client take the map from the central map server and
display on their
> screen which is on opengl..
> can u suggest ..how should i approach this ..i don;t have
any idea about the
> mapserver programming is concerned...
> can u suggest any sample code which i could run on my
machine so as to check
> the compatibilty,
> or any docs that u can refer ..
> 3.
> I was looking for the  grass option ..Do u have any idea
..that does grass
> also need the mapserver to maintain the repository of
data.,,
> ???
> Looking forward for ur Reply.
> Thanks
>
>
> On 2/27/08, vishal nagpal <[EMAIL PROTECTED]> wrote:
> >
> > Hi Kunal,
> > 1. I do not have much experience on grass. but i hv read
a little about
> > it.
> > 2. All the six requirements mentioned below can be done
with both Grass
> > and Mapserver.
> > 3. What I know, GRASS is a very good and  exhaustive
software.
> > Mapserver  also  has lot of  features that GRASS has.
> > 3. Mapserver is an ideal solution if you wish to use web
based service.
> > However, it also works on a Server-client model also.
> > 4. I am not too sure why you need compatibility with
OpenGL. Probably you
> > wish to see the data in 3D. Both these servers represent
data in 2D only.
> > all the best
> > Regards,
> > Vishal
> >
> >
> >
> > On Tue, Feb 26, 2008 at 7:01 PM, Kunal Malik
<[EMAIL PROTECTED]>
> > wrote:
> >
> > > Hi Vishal !!
> > > I am working on Grass Tool & also Looking for
map-server.
> > > I have following requirement.,.
> > > 1)Importing of Raster & Vector Maps.
> > > 2) Re-Projection
> > > 3)Create & Edit layer.
> > > 4)Display Maps
> > > 5)Set Transparency
> > > 6)Stiching of Maps
> > > and so on..
> > > I have to use the GIS feature,,
> > > I am told to look all this on open-source tool,,,so i
am looking it on
> > > Grass and Mapserver..my display is on OpenGL..also i
have to take care that
> > > tool i use should work with opengl..
> > > can u suggest that going for grass & Mapserver..would
able to resolve
> > > all the requirements.
> > > Thanks
> > >
> > > On 2/26/08, vishal nagpal <[EMAIL PROTECTED]> wrote:
> > > >
> > > > hi i hv seen ur queries in mapserver list how can i
help u. i hav been
> > > > wkg on mapserver for around six months now,
> > > > Regards,
> > > > Vishal
> > > >
> > >
> > >
> > >
> > > --
> > > Thanks & Regards
> > >
> > > Kunal Malik
> > > 09871147561
> >
> >
> >
>
>
> -- 
> Thanks & Regards
>
> Kunal Malik
> 09871147561
>






> ___
> 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] can an ogr tileindex refer to a PG table?

2008-02-27 Thread Neil Best

Milo van der Linden wrote:

Hello Neil,

One thing you can do to create some sort of tileindex that can be part 
of the where clause is create a view in postGIS that contains the 
boundingboxes of a table based upon an attribute:


CREATE VIEW MYBBOX AS
SELECT
table1.uniqueID,
extent(table1.the_geom) as box,
box2d(scale(extent(table1.the_geom),1.01,1.01)) as bbox
FROM
table1
GROUP BY
table1.UniqueID;

Where BOX is the exact extent and bbox is the extent + a little margin, 
this I used to zoom with an area around it because my original MYBBOX 
view was based on a points table.


This view could be used as a helper to build the right queries.



THanks for your note, Milo.  I am pursuing your suggestion but having 
trouble optimizing the queries.  It would probably be more apporpriate 
to continue this thread on postgis-users so I am cc-ing there as well.


First, I should mention that I believe your example has a flaw that you 
might want to consider.  As I read it the PostGIS scale() function 
multiplies the x-coordinates by the first factor and the y-coordinates 
by the second resulting in a scaling relative to the origin rather than 
an expansion of the geometry relative to its centroid.  PostGIS expand() 
does this but by taking a single argument and using that as an offset in 
all directions, not a multiplier.


The problem that I am having is that the query planner is not taking 
advantage of the sub-query on my tile index that is supposed to provide 
the short list of attributes to drive the constraint exclusion feature 
for table partitioning.


EXPLAIN ANALYZE SELECT count(*) FROM mapunits
WHERE areasymbol IN (SELECT areasymbol AS a
FROM tileindex
WHERE areasymbol ~ '^IA'
  AND wkb_geometry && geomFromText(
  'POLYGON((-47671.875 2252234.375, -40343.750 2252234.375, 

-40343.750 2259562.500, -47671.875 2259562.500, 


-47671.875 2252234.375))', 32767));

The sub-query by itself is blindingly fast ( < 0.1s) and returns a 
single value 'IA119'.  If I write:


EXPLAIN ANALYZE SELECT count(*) FROM mapunits
WHERE areasymbol IN ('IA119');

it also comes back relatively quickly.  Constraint exclusion kicks in 
and limits the scan to only children whose table constraints satisfy the 
WHERE clause.


The query plan for the full query above indicates that it is doing a 
"Hash IN Join" with "Hash Cond: (ssurgo.mapunits.areasymbol = 
tileindex.areasymbol)" and scanning all of the children of mapunits 
before using the results of the sub-query to limit which children is 
scans.


The big question:  How do I rewrite this to take advantage of constraint 
exclusion in a spatial query?  Ultimately I will use Mapserver CGI 
substitution to  replace the constants in the WKT into the bounding box 
of the requested map, making the sub-query capable of returning variable 
results of indeterminate length.  This is not the full query of my 
application, rather a test that I cooked up to try to understand the 
behavior of the query planner.


As it is my Mapserver application performs tolerably well without trying 
to optimize for constraint exclusion, presumably because it is checking 
the bounding box of the spatial query against the spatial index of each 
child table and moving through them relatively quickly, but it seems 
that there should still be some performance gains to be had.


Thanks, everyone.

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


[MAPSERVER-USERS] Roads: road style and shields

2008-02-27 Thread mpettis

REPOSTING: not sure this is getting to the right email lists due to
migration...

Hi,

I have been browsing the archives for examples of nice (read: googlish) ways
of rendering roads and using shields (like the interstate shield, the US
Highway shield) in a mapfile.  I've seen some work on googlish map layout by
Bob Basques (sp?), but is anyone willing to post an example of how to use
highway shields in rendering a map?

And, examples of nice road renderings, in addition to Bob's, are welcome.

Thanks,
Matt
-- 
View this message in context: 
http://www.nabble.com/Roads%3A-road-style-and-shields-tp15720008p15720008.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] Roads: road style and shields

2008-02-27 Thread Gregor Mosheh

I have been browsing the archives for examples of nice (read: googlish) ways
of rendering roads and using shields


I hate to be a metoo, but if someone does have such available, would you 
please post it to the Symbology Exchange on the Mapserver site (I think 
it's in HOWTOs)? The goal there was to collect nice symbologies and have 
them in a publicly-accessible shared splace.


--
Gregor Mosheh / Greg Allensworth, BS, A+
System Administrator
HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
 only if you can restore." - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic mapping with CGI parameters

2008-02-27 Thread Colin Wetherbee

Roberto Bianconi wrote:

I'm probably missing something, but I don't see the problem with Approach #1.
It gives you total control on your application.


My approach #1 was contingent on the part about not actually creating 
individual map files on the disk.


Thank you for your long reply, though.

Colin

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


RV: [mapserver-users] MapServer consuming 100% CPU

2008-02-27 Thread Fuchs Juan Carlos
 
-Mensaje original-
De: Fuchs Juan Carlos 
Enviado el: Miércoles, 27 de Febrero de 2008 04:07 p.m.
Para: 'Desarrollo Desarrollo'
CC: mapserver-users@lists.osgeo.org
Asunto: RE: [mapserver-users] MapServer consuming 100% CPU


Sergio:
One's more:
in my .map  ( http://200.51.91.231  .)
I separated all lines/poligons from labels.
Say:
layer Rivers
Tipe Line
Group Aqua...
several classes
the first for the big and important ones
the second for the adyascent and permanent rivers
the last for the little ones
each one restricted with minscale  / maxscale
 
layer Names
Group Aqua
type Annotation...
same classes, same maxscale  /  minscale restrictions
just different type sizes for each one
 
Remember that Truetype is a bit slower that Bitmap, but it's worth the
prize!
 
The group statement is to turn on / off in only one call.
 
On the other side it let's you track down the render time for each layer
so you will have a better control.
 
I never tried the new toy 
ANGLE Follow 
Its supoused to follow the line path along the river !!
 
If we are struggling to beat down the render time, keep it simple
but if you want it to be nice ...  :)
 
In reference to your Windows+ASP/Linux+Apache question, in my experience
it's quite the same
diferences i made comes from intensive (really intensive) map file tunning!.
http://mapserver.gis.umn.edu/docs/howto/mapfiletuning
  (It's is a must
read!)
 
happy testing!
JC.

-Mensaje original-
De: Desarrollo Desarrollo [mailto:[EMAIL PROTECTED]
Enviado el: Miércoles, 27 de Febrero de 2008 08:39 a.m.
Para: Fuchs Juan Carlos
CC: mapserver-users@lists.osgeo.org
Asunto: Re: [mapserver-users] MapServer consuming 100% CPU


Hello!
Thank you for your answer. 
I think you are right, please take a look in this thread to the answer I've
post to Ritesh Ambastha, I've reproduce the three tests using PostGRE /
PostGIS and although is the fastest data access the labeling is still the
hard work to MapServer. 
I'm going to play with MINFEATURESIZE, MINDISTANCE and all the options that
Mapserver allows to use, and I'll report back here the results, but just one
thing more to ask, Is this the normal behavior of Mapserver?, I'm trying to
confirm that if you do the same test with mapserver, no matter if you are
running in linux or windows, I wish to know that my Mapserver has no bugs or
incorrect / old libraries that makes labeling be slower.

Thank you very much, best regards
Sergio


2008/2/26, Fuchs Juan Carlos < [EMAIL PROTECTED]
 >: 

Hi Sergio:
PostGis maybe a good solution, in terms of stability (means system do not
crash, so often :) ).
But in concern with line labeling, things become bad.
 
Hydrologic data are a bunch of lines with irregular shape, and very often
segmented.
I mean that the same river could have trillons of segments in his path, and
in the same 
manner, trillons of labels !!
 
Try with some restrictions to the labeling work, 
say not allowing to labeling features under 5 say 7 pixels

MINFEATURESIZE  Minimum size a feature must be to be labeled. Given in
pixels. For line data the overall length of the displayed line is used, for
polygons features the smallest dimension of the bounding box is used. "Auto"
keyword tells MapServer to only label features that are larger than their
corresponding label. Available for cached labels only. 


Value: [integer|auto]


say not allowing to repeat labeling features in spaces of 20 say 25 pixels
 

MINDISTANCE Minimum distance between duplicate labels. Given in pixels. 


Value: [integer]


 
Sometimes a lit bit of map file tuning is necesary
 
Hope its helps, 
JC.

 

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


[mapserver-users] PHP-mapscript Dynamic Mapfile Object

2008-02-27 Thread Burgholzer,Robert
Are there any projects out there that have assembled a simple PHP-class to 
handle the dynamic generation of a mapfile?

I am thinking something that would have properties akin to the mapfile itself, 
settable, then a method like "render" that would output the file to be used by 
the mapserv process.

Any info/links on this, or an explanation of why I have rocks in my head for 
thinking about it, are welcome,

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


Re: [MAPSERVER-USERS] Mailing List Migration

2008-02-27 Thread rich.fromm


rich.fromm wrote:
> 
> Why do posts keep showing up on the old list?  Should it perhaps be forced
> to
> be read only?
> 

Ah, I see from a post to the old list that this is intentional, and
scheduled to stop at the end of February (in two days):

http://www.nabble.com/Mailing-List-Shutdown-to15721478.html

I would suggest that an autoreply pointing to the new list might be better
than a pure bounce at least in the short term.  Or maybe that's already
planned...

- Rich

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Mailing-List-Migration-tp15702356p15722051.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


Fwd: Re: [MAPSERVER-USERS] Mailing List Migration

2008-02-27 Thread absar ali

Please remove my email from this list
[EMAIL PROTECTED]


Note: forwarded message attached.
   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.--- Begin Message ---


rich.fromm wrote:
> 
> Why do posts keep showing up on the old list?  Should it perhaps be forced
> to
> be read only?
> 

Ah, I see from a post to the old list that this is intentional, and
scheduled to stop at the end of February (in two days):

http://www.nabble.com/Mailing-List-Shutdown-to15721478.html

I would suggest that an autoreply pointing to the new list might be better
than a pure bounce at least in the short term.  Or maybe that's already
planned...

- Rich

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Mailing-List-Migration-tp15702356p15722051.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
--- End Message ---
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Image shrinking problem

2008-02-27 Thread Frank Warmerdam

Juozas Urbonas wrote:
I'm sorry, I forgot to mention, that I'm creating GDAL driver, which I'm 
trying to use with MapServer.
 
Here is the gdalinfo for my map:

Driver: AkisAx/Akis Map Link (.mln)


...

Hi All,
 
When I'm requesting some image using WMS, my overridden IRasterIO

gets called with nBufXSize and nBufYSize nearly double the size I'm
requesting in WMS call and in the process image returned by WMS gets
shrinked. What may cause this problem?
I'm expecting nBufXSize and nBufYSize to be approximately the same
size as in WMS request.


Juozas,

I seem to have missed this question the first time around.  If you request
the image by WMS in it's native coordinate system then MapServer should do
a RasterIO() request to the GDAL driver suitable for direct application to
the WMS image buffer.  That is the buffer xsize/ysize will be no larger than
the requested image.

But if you request in another coordinate system, or if MapServer decides to
go through the "general resampler" (ie. mapresample.c) for any other
reason (such as non-square pixel request, rotated image, RESAMPLE=) then things are different.  In this case mapresample.c
will request the image for the region of interest at approximately double
the final request resolution and then sample from that buffer.

You can control this "oversampling ratio" using the OVERSAMPLE_RATIO
PROCESSING directive.

eg.
PROCESSING "OVERSAMPLE_RATIO=1.1"

Note that I pull at double resolution in the hopes of avoiding some aliases
issues with fetching the data at nearly the target resolution before going
through the resampler.  So you may see image quality degrade if you pick a
modest oversample ratio.

Best regards,


--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| President OSGeo, http://osgeo.org

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


RE: [MAPSERVER-USERS] Roads: road style and shields

2008-02-27 Thread Bruce, Bob (CON)
Hi:
is there a way to put images of what the shields and renderings
look like into the symbology exchange as well as the mapfile
definitions? I have a few symbols and renderings to share but I'm now
sure if they are substantially different than what is there already.

Bob 

-Original Message-
From: mpettis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 27 February, 2008 12:42 PM
To: mapserver-users@lists.osgeo.org
Subject: [MAPSERVER-USERS] Roads: road style and shields


REPOSTING: not sure this is getting to the right email lists due to
migration...

Hi,

I have been browsing the archives for examples of nice (read: googlish)
ways of rendering roads and using shields (like the interstate shield,
the US Highway shield) in a mapfile.  I've seen some work on googlish
map layout by Bob Basques (sp?), but is anyone willing to post an
example of how to use highway shields in rendering a map?

And, examples of nice road renderings, in addition to Bob's, are
welcome.

Thanks,
Matt
--
View this message in context:
http://www.nabble.com/Roads%3A-road-style-and-shields-tp15720008p1572000
8.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] PHP MapScript AGG

2008-02-27 Thread Bryn Roberts
Hello All,

I've been using MapServer and MapScript both for work and home projects for a 
couple of years now, and am delighted with the quality of maps produced by 
MapServer 5 using AGG.
However, I have not been able to work out how to specify a map to be rendered 
using the AGG driver from within PHP MapScript.
In my particular case I am creating a Map Object in PHP without a Map file.
Everything works fine but the following two lines seem not to trigger AGG 
rendering (I have never tried setting output format options from within
MapScript before and was unable to find any examples).
.
$map->outputformat->setOption("name", "AGG");
$map->outputformat->setOption("imagemode", MS_IMAGEMODE_RGB);
$map->outputformat->setOption("driver", "AGG/PNG");
.
Can somebody set me straight and point out where I am going wrong?
Thanks in advance,
Bryn

-
This transmission is intended solely for the person or
organisation to whom it is addressed.
It is confidential and may contain legally privileged
information. If you have received this transmission in
error,you may not use, copy or distribute it.
Please advise us by return e-mail or by phoning 61 3 62338203
and immediately delete the transmission in its entirety.
We will meet your reasonable expenses of notifying us.
Despite our use of anti-virus software, Forestry Tasmania
cannot guarantee that this transmission is virus-free.
-

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


Re: [MAPSERVER-USERS] Roads: road style and shields

2008-02-27 Thread Bob Basques
There is an example MAPFILE in the download of the Googlish demo pkg. on 
the GeoMoose site.


bobb



mpettis wrote:

REPOSTING: not sure this is getting to the right email lists due to
migration...

Hi,

I have been browsing the archives for examples of nice (read: googlish) ways
of rendering roads and using shields (like the interstate shield, the US
Highway shield) in a mapfile.  I've seen some work on googlish map layout by
Bob Basques (sp?), but is anyone willing to post an example of how to use
highway shields in rendering a map?

And, examples of nice road renderings, in addition to Bob's, are welcome.

Thanks,
Matt
  

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


Re: [mapserver-users] Re: Query Regrading Map Server

2008-02-27 Thread Kunal Malik
Hi Brent!!
U have Written that it does not allow the layer & its objects.
if we were having the requirement of editing the layer.is that not
possible.Moreover i want to know that does MapServer + openGl works for the
following .

1.Import & Export Maps
2.Create,Delete & Edit Layers
3.ReProjection of Data.
4.Conversion of Map from one datum & projection to Datum wgs84 & Proejction
LCC.
5.Raster to Vector conversion & vice versa
6. Set Transparency.
7. Layer priority,

Please Suggest the requirement could be fulfliied by Mapserver and all the
data would be displayed on OpenGL.
could grass be helpful in this regard??
Thanks

On 2/27/08, Brent Fraser <[EMAIL PROTECTED]> wrote:
>
> Kunal,
>
>   If OpenGL is a strict requirement, you may want to look at
> VTP (www.vterrain.org), or ossimPlanet (www.ossim.org).
> Neither allow editing of map data but you can add/delete
> layers.  I think they will do the other requirements you
> listed.
>
> Brent Fraser
> GeoAnalytic Inc.
> Calgary, Alberta
>
>
> - Original Message -
> From: "Kunal Malik" <[EMAIL PROTECTED]>
> To: "vishal nagpal" <[EMAIL PROTECTED]>
> Cc: 
> Sent: Tuesday, February 26, 2008 10:54 PM
> Subject: [mapserver-users] Re: Query Regrading Map Server
>
>
> > Hi Vishal!!
> > 1.
> > As far as the compatibilty with the opengl is concerned i
> am asking this
> > because my display module is made on opengl and i have to
> display the raster
> > & the vector image on it.
> > 2.
> > we don't have to use the web-server as our application
> will run on intranet
> > ..we want that mapserver to interact with opengl..
> > 32 client take the map from the central map server and
> display on their
> > screen which is on opengl..
> > can u suggest ..how should i approach this ..i don;t have
> any idea about the
> > mapserver programming is concerned...
> > can u suggest any sample code which i could run on my
> machine so as to check
> > the compatibilty,
> > or any docs that u can refer ..
> > 3.
> > I was looking for the  grass option ..Do u have any idea
> ..that does grass
> > also need the mapserver to maintain the repository of
> data.,,
> > ???
> > Looking forward for ur Reply.
> > Thanks
> >
> >
> > On 2/27/08, vishal nagpal <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi Kunal,
> > > 1. I do not have much experience on grass. but i hv read
> a little about
> > > it.
> > > 2. All the six requirements mentioned below can be done
> with both Grass
> > > and Mapserver.
> > > 3. What I know, GRASS is a very good and  exhaustive
> software.
> > > Mapserver  also  has lot of  features that GRASS has.
> > > 3. Mapserver is an ideal solution if you wish to use web
> based service.
> > > However, it also works on a Server-client model also.
> > > 4. I am not too sure why you need compatibility with
> OpenGL. Probably you
> > > wish to see the data in 3D. Both these servers represent
> data in 2D only.
> > > all the best
> > > Regards,
> > > Vishal
> > >
> > >
> > >
> > > On Tue, Feb 26, 2008 at 7:01 PM, Kunal Malik
> <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Hi Vishal !!
> > > > I am working on Grass Tool & also Looking for
> map-server.
> > > > I have following requirement.,.
> > > > 1)Importing of Raster & Vector Maps.
> > > > 2) Re-Projection
> > > > 3)Create & Edit layer.
> > > > 4)Display Maps
> > > > 5)Set Transparency
> > > > 6)Stiching of Maps
> > > > and so on..
> > > > I have to use the GIS feature,,
> > > > I am told to look all this on open-source tool,,,so i
> am looking it on
> > > > Grass and Mapserver..my display is on OpenGL..also i
> have to take care that
> > > > tool i use should work with opengl..
> > > > can u suggest that going for grass & Mapserver..would
> able to resolve
> > > > all the requirements.
> > > > Thanks
> > > >
> > > > On 2/26/08, vishal nagpal <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > hi i hv seen ur queries in mapserver list how can i
> help u. i hav been
> > > > > wkg on mapserver for around six months now,
> > > > > Regards,
> > > > > Vishal
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Thanks & Regards
> > > >
> > > > Kunal Malik
> > > > 09871147561
> > >
> > >
> > >
> >
> >
> > --
> > Thanks & Regards
> >
> > Kunal Malik
> > 09871147561
> >
>
>
>
> 
> 
>
>
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
>


-- 
Thanks & Regards

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