Re: [mapserver-users] MapServer -7-4-0-beta1 Release

2019-04-01 Thread Andy Colson

On Sat, Mar 30, 2019, at 4:07 PM, Andy Colson wrote:

On 3/30/19 7:23 AM, Seth G wrote:

Hi all,

The MapServer team is happy to announce the release of the first beta for 
MapServer 7.4.0.
Download links are at 
https://github.com/mapserver/mapserver/releases/tag/rel-7-4-0-beta1


If there are users of the Perl, Ruby, Java, and TCL bindings who would like to 
get involved in supporting and maintaining these bindings please get in touch!

A working build process and example scripts in each language would help bring 
the level of support for each langauge inline with the others.


Best regards,

The MapServer PSC and Developers


I host lots of maps using perl mapscript.  I'm happy to contribute with
whatever you need.

-Andy




On 3/31/2019 3:45 PM, Seth G wrote:> Hi Andy,
>
> Thanks for the offer!
> I have opened a new issue up at 
https://github.com/mapserver/mapserver/issues/5777
> This hopefully details the steps required to build Perl MapScript on 
every change to the MapServer codebase.
> There are also the Perl examples at 
https://github.com/mapserver/mapserver/tree/branch-7-4/mapscript/perl/examples 
that it would be helpful to review and check that they are still working 
before running on each build.

> Feel free to ask any questions,
>
> Seth
>
> --
> web:http://geographika.co.uk
> twitter: @geographika
>


The examples seem more like a teaching tool, not a testing tool, yes? 
RFC24.pl seems like a good test script, but I'd rather use standard perl 
TAP test framework.  Ok if I use Test::More?  It comes standard with 
perl.  Then you test with "prove" (also standard)


Should test scripts go in mapserver/mapscript/perl, or 
mapserver/msautotest/perl?


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

Re: [mapserver-users] MapServer -7-4-0-beta1 Release

2019-03-30 Thread Andy Colson

On 3/30/19 7:23 AM, Seth G wrote:

Hi all,

The MapServer team is happy to announce the release of the first beta for 
MapServer 7.4.0.
Download links are at 
https://github.com/mapserver/mapserver/releases/tag/rel-7-4-0-beta1


If there are users of the Perl, Ruby, Java, and TCL bindings who would like to 
get involved in supporting and maintaining these bindings please get in touch!

A working build process and example scripts in each language would help bring 
the level of support for each langauge inline with the others.


Best regards,

The MapServer PSC and Developers


I host lots of maps using perl mapscript.  I'm happy to contribute with 
whatever you need.

-Andy

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

Re: [mapserver-users] PDF output with layers

2017-09-04 Thread Andy Colson

On 09/04/2017 09:43 AM, Carlos Ruiz wrote:

Hey Andy,

The PDF file is not empty, it shows both raster and vector layers. The -mdd 
LAYERS does not show layers info. I am using MS4W 3.1.3 which, according to the 
MS4W site has GDAL 2.0.2




I see, on that same page:
http://www.gdal.org/frmt_pdf.html

That different pdf libraries have different possibilities (section "Build 
dependencies").  I'm not sure how to tell which pdf lib its using though.

And section: "LAYERS Metadata domain", it says:

Starting with GDAL >= 1.10.0 and when GDAL is compiled against Poppler or 
PDFium, the LAYERS metadata domain can be queried to retrieve layer names


I dunno, maybe.  I'm guessing.

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

Re: [mapserver-users] Simple fix but I'm new: I’ve installed MapServer but can’t see the layers on the ‘demo’

2017-09-04 Thread Andy Colson

On 09/04/2017 05:15 AM, Neil Pritchard wrote:

I’ve installed MapServer but can’t see the layers on the ‘demo’.
I followed the instructions on the MapServer website, to install
MapServer on Ubuntu LTS 16.04.3 Server:-

Created the following apache configuration to the file in
/etc/apache2/sites-available/001-mapserver.conf :-


 ErrorLog ${APACHE_LOG_DIR}/mapserver-error.log


That error log might contain some useful info, you should check it.



When working through this example:-
http://mapserver.org/uk/tutorial/example1-1.html#example1-1


I've never gone through the example, so I might not understand.




I tried calling the URI to see a single layer:-
http://localhost/cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map

In my case I’m working on a headless Linux virtual machine so used the
following URI:-
http://192.168.116.135/mapcache?map=/ms4w/apps/tutorial/htdocs/example1-1.map&layer=states&mode=map




The HTML response only contained the following text:-
received wms with no service and request




But on openlayers sample page:
http://openlayers.org/en/latest/examples/epsg-4326.html?q=

it makes single layer requests like:
https://ahocevar.com/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=ne%3ANE1_HR_LC_SR_W_DR&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A4326&STYLES=&BBOX=0%2C-90%2C90%2C0

(Yes, its geoserver not mapserver, but the same params are sent to both.  And 
it contains SERVICE=WMS and REQUEST=GetMap)

Also, I should note, I've not used mapcache.  I think you should first get 
mapserver working and forget mapcache for the moment.  Put mapcache on top of a 
working mapserver.


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

Re: [mapserver-users] PDF output with layers

2017-09-04 Thread Andy Colson

On 09/04/2017 09:20 AM, Carlos Ruiz wrote:

I'm currently exploring PDF generation from Mapserver and I have noticed that 
no layers appear to be toggled. First I thought this was because the layer 
CLASS section has no name (as it happens when legend is generated), but it is 
not.

gdalinfo test.pdf does not show layers information.

Does anybody know how to configure a MAP file to include layers in the PDF 
output ?

Here is test.map contents:

MAP

 NAME "test"
 EXTENT 657024 2277645 687240 2294128
 SIZE 800 600

 OUTPUTFORMAT
 NAME "pdf"
 DRIVER CAIRO/PDF
 MIMETYPE "application/x-pdf"
 IMAGEMODE RGB
 EXTENSION "pdf"
 FORMATOPTION "GEO_ENCODING=ISO32000"
 END

 PROJECTION
 "init=EPSG:32613"
 END

 STATUS ON

 LAYER
 NAME "Landsat 8"
 CONNECTION "http://localhost/cgi-bin/landsat8.exe";
 CONNECTIONTYPE WMS
 TYPE RASTER
 STATUS ON
 METADATA
 "wms_name" "Landsat 8"
 "wms_srs" "EPSG:32613"
 "wms_server_version" "1.0.0"
 "wms_format" "image/jpeg"
 END
 END

 LAYER
 NAME "Colonias"
 CONNECTION "..."
 CONNECTIONTYPE POSTGIS
 DATA "geom FROM colonias_amg"
 TYPE POLYGON
 CLASS
 NAME "Colonias"
 STYLE
 COLOR 255 200 150
 OUTLINECOLOR 0 0 0
 END
 END
 COMPOSITE
 OPACITY 35
 END
 STATUS ON
 END

END

Thanks in advance




How does the pdf look?  Is it empty?

This page:
http://www.gdal.org/frmt_pdf.html

shows the example:


gdalinfo adobe_style_geospatial.pdf -mdd LAYERS



Does the extra "-mdd LAYERS" help?

Looks like you need GDAL 1.9 or above, what are you on?

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

Re: [mapserver-users] Fwd: Zoom to something and display in one shot from MapServer CGI.

2017-07-11 Thread Andy Colson

On 7/11/2017 1:43 PM, Basques, Bob (CI-StPaul) wrote:

Steve,

Yeah, my poison is Perl.  Was just trying to make it simpler is all.

I have a few services already in place like this.

A separate service it is then . . .

bobb


You want something like this:
http://maps.camavision.com/map/jasperia?pin=08.34.204.012


I use perl with mapscript, the request looks like:

my $xpin = $req->param('pin');
# pin can only contain letters and numbers
($xpin) = $xpin =~ /(\w+)/;

my $map = new mapscript::mapObj($filename);

$q = $db->prepare(
"select * from $schema.getpoint where pin = \$1",
{pg_server_prepare => 0}
);

getPoint returns box2d(st_expand(the_geom, 100)) for a single pin.

Then we generate some javascript:

if ($zoom =~ /BOX\(([-0-9\.]+)\s+([-0-9\.]+),([-0-9\.]+)\s+([-0-9\.]+)\)/)
{
$zoom = "zoomToBound($1, $2, $3, $4);\n";
}

That variable is included in the html, and I have a javascript library 
function:


function zoomToBound(x1, y1, x2, y2) {
var bb = new OpenLayers.Bounds.fromArray([x1, y1, x2, y2]);
map.zoomToExtent(bb, true);
}


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

Re: [mapserver-users] Class maxscaledenom performance

2017-06-03 Thread Andy Colson

On 05/31/2017 09:56 PM, Richard Greenwood wrote:

On Wed, May 31, 2017 at 2:40 PM, Jeff McKenna mailto:jmcke...@gatewaygeomatics.com>> wrote:

- be sure to have PostGIS create OIDs by default in your databases (see the 
"default_with_oids" setting in postgresql.conf)


I have not seen that recommendation before. Can you explain why it is 
beneficial?

Thanks,
Rich



Agreed.  This sounds wrong to me, and I can't imagine how it would improve 
performance.  I can, however, see it causing problems.  The documentation says:


The use of OIDs in user tables is considered deprecated


And slightly paraphrased:


 OIDs are four-byte integer and therefore not large enough to provide 
uniqueness to large individual tables


Please explain.

-Andy





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

Re: [mapserver-users] Symbols for railroad rendering in svg

2016-11-18 Thread Andy Colson

Oh, also, my mapserver is:

MapServer version 7.0.2 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG 
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS 
INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE



On 11/18/2016 05:36 PM, TMa Teng wrote:

Thanks for sharing your method.

However that is still brush line for the railway symbol which is not supported 
when using SVG format, isn’t it? Could you verify if a wms getmap call which 
contains the railway layer and in the getmap request set the output format=SVG 
to see if that works at your side?

Thanks again,
Teng

-Original Message-
From: Andy Colson [mailto:a...@squeakycode.net]
Sent: Friday, November 18, 2016 5:52 PM
To: mapserver-users@lists.osgeo.org; TMa Teng 
Subject: Re: [mapserver-users] Symbols for railroad rendering in svg

On 11/18/2016 2:22 PM, TMa Teng wrote:

Hi all,

I am working on a project to export the wms to SVG format, it is the from the 
requirement of the features to be in vector format. And I am facing trouble to 
use the render engine to render the railroad symbol as a brush line.

RailRoad Symbol I am using is as follow:

CLASS
NAME "MD_Railroad"

STYLE
   SYMBOL "line_solid"
   SIZE 2
   COLOR 0 0 0
END
STYLE
   SYMBOL "tie"
   SIZE 6
   COLOR 0 0 0
   GAP -10
END
END

It works as expect when the return image in raster format such as PNG, but when 
using SVG it shows error:

"msDrawLineSymbol(): Renderer error. renderer does not support brushed lines"

Does anyone have any suggestion about how to design a vector-enabled symbol for 
railways please? I am using MapServer 7.0, data is in SQL Server Spatial.

Best regards,

Teng

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



Without seeing the "tie" symbol, its hard to say if mine is different.
Here's how I draw mine:

SYMBOL
NAME "railway"
TYPE truetype
FONT "Vera"
CHARACTER "|"
END

CLASS
NAME 'Railroad'
STYLE
SYMBOL 0
COLOR 0 0 0
SIZE 1
END
STYLE
SYMBOL 'railway'
COLOR 0 0 0
SIZE 7
GAP -10
END
END

-Andy



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

Re: [mapserver-users] Symbols for railroad rendering in svg

2016-11-18 Thread Andy Colson

Seems to work fine:

http://maps.camavision.com/map/jasperia?LAYERS=railroad&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=svg&SRS=EPSG%3A3857&BBOX=-10383282.7081,5105096.2257452,-1032.7081,5127296.2257452&WIDTH=1998&HEIGHT=888

-Andy


On 11/18/2016 05:36 PM, TMa Teng wrote:

Thanks for sharing your method.

However that is still brush line for the railway symbol which is not supported 
when using SVG format, isn’t it? Could you verify if a wms getmap call which 
contains the railway layer and in the getmap request set the output format=SVG 
to see if that works at your side?

Thanks again,
Teng

-Original Message-
From: Andy Colson [mailto:a...@squeakycode.net]
Sent: Friday, November 18, 2016 5:52 PM
To: mapserver-users@lists.osgeo.org; TMa Teng 
Subject: Re: [mapserver-users] Symbols for railroad rendering in svg

On 11/18/2016 2:22 PM, TMa Teng wrote:

Hi all,

I am working on a project to export the wms to SVG format, it is the from the 
requirement of the features to be in vector format. And I am facing trouble to 
use the render engine to render the railroad symbol as a brush line.

RailRoad Symbol I am using is as follow:

CLASS
NAME "MD_Railroad"

STYLE
   SYMBOL "line_solid"
   SIZE 2
   COLOR 0 0 0
END
STYLE
   SYMBOL "tie"
   SIZE 6
   COLOR 0 0 0
   GAP -10
END
END

It works as expect when the return image in raster format such as PNG, but when 
using SVG it shows error:

"msDrawLineSymbol(): Renderer error. renderer does not support brushed lines"

Does anyone have any suggestion about how to design a vector-enabled symbol for 
railways please? I am using MapServer 7.0, data is in SQL Server Spatial.

Best regards,

Teng

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



Without seeing the "tie" symbol, its hard to say if mine is different.
Here's how I draw mine:

SYMBOL
NAME "railway"
TYPE truetype
FONT "Vera"
CHARACTER "|"
END

CLASS
NAME 'Railroad'
STYLE
SYMBOL 0
COLOR 0 0 0
SIZE 1
END
STYLE
SYMBOL 'railway'
COLOR 0 0 0
SIZE 7
GAP -10
END
END

-Andy



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

Re: [mapserver-users] Symbols for railroad rendering in svg

2016-11-18 Thread Andy Colson

On 11/18/2016 2:22 PM, TMa Teng wrote:

Hi all,

I am working on a project to export the wms to SVG format, it is the from the 
requirement of the features to be in vector format. And I am facing trouble to 
use the render engine to render the railroad symbol as a brush line.

RailRoad Symbol I am using is as follow:

CLASS
NAME "MD_Railroad"

STYLE
   SYMBOL "line_solid"
   SIZE 2
   COLOR 0 0 0
END
STYLE
   SYMBOL "tie"
   SIZE 6
   COLOR 0 0 0
   GAP -10
END
END

It works as expect when the return image in raster format such as PNG, but when 
using SVG it shows error:

"msDrawLineSymbol(): Renderer error. renderer does not support brushed lines"

Does anyone have any suggestion about how to design a vector-enabled symbol for 
railways please? I am using MapServer 7.0, data is in SQL Server Spatial.

Best regards,

Teng

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



Without seeing the "tie" symbol, its hard to say if mine is different. 
Here's how I draw mine:


SYMBOL
NAME "railway"
TYPE truetype
FONT "Vera"
CHARACTER "|"
END

CLASS
NAME 'Railroad'
STYLE
SYMBOL 0
COLOR 0 0 0
SIZE 1
END
STYLE
SYMBOL 'railway'
COLOR 0 0 0
SIZE 7
GAP -10
END
END

-Andy

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

Re: [mapserver-users] PostGIS query errors

2016-11-09 Thread Andy Colson

On 11/9/2016 3:30 PM, Kralidis, Tom (EC) wrote:

Hi all: using 7.0.2 against a PostgreSQL 9.3/PostGIS 2.2 instance we're getting 
query errors.

I've posted a Gist at [1] to help in reporting.  Note that this functionality 
used to work in 6.4.x.

From the migration guides it doesn't look like much has changed w.r.t. PostGIS 
syntax in
the mapfile.  Any idea what could be going on here?  It looks like the query 
that is constructed
by mappostgis.c is something like:

select 
"stn_nam","avg_wnd_dir_10m_mt58_60","avg_wnd_spd_10m_mt58_60_symbol","air_temp","stn_pres","mslp","dwpt_temp","rel_hum","observation_qa_summary","observation_qa_problem_summary",encode(ST_AsBinary(ST_Force2D("the_geom"),'NDR'),'hex')
 as geom,"data_payload_id" from (select * from data_mart_ca_live order by instance_datetime desc) as subquery where the_geom && ST_GeomFromText('POLYGON((-127.881959628204 
63.7547758989546,-127.881959628204 70.5833900726923,-103.751686743445 70.5833900726923,-103.751686743445 63.7547758989546,-127.881959628204 63.7547758989546))',4326) and ()

Note the trailing "()".  When I remove the "()" and try direct in psql, the 
query works.

Any idea what could be going on here?

Thanks

..Tom

[1] https://gist.github.com/tomkralidis/26cb7214e282c144ba61598116d458e7
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



It looks to me, from the code mappostgis.c ~line 2018, in the 
msPostGISBuildSQLWhere function, that you have either a FILTER or 
NATIVE_FILTER being added.  I don't see it in the gist you posted 
though.  Is it applied later some how?  I'd bet it's also empty.


There is a comment about RFC91 too:
http://mapserver.org/id/development/rfc/ms-rfc-91.html

any of that apply to you?

-Andy


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

[mapserver-users] compile 7.0.1 error, glib.h not found

2016-07-12 Thread Andy Colson

Hi all.

I tried:
cmake .. -DWITH_PERL=1


Scanning dependencies of target mapserver
[  1%] Building C object CMakeFiles/mapserver.dir/fontcache.c.o
In file included from /usr/include/fribidi/fribidi.h:35:0,
 from /tmp/SBo/mapserver-7.0.1/fontcache.h:13,
 from /tmp/SBo/mapserver-7.0.1/fontcache.c:32:
/usr/include/fribidi/fribidi-common.h:61:20: fatal error: glib.h: No such file 
or directory
compilation terminated.
CMakeFiles/mapserver.dir/build.make:62: recipe for target 
'CMakeFiles/mapserver.dir/fontcache.c.o' failed


I found a prior reference to this:

http://osgeo-org.1560.x6.nabble.com/Error-building-Mapserver-6-4-1-with-fribidi-td5099725.html#a5099926


# pkg-config --cflags fribidi
-I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include

# ls /usr/include/glib-2.0
gio/  glib/  glib-object.h  glib-unix.h  glib.h  gmodule.h  gobject/

# cmake --version
cmake version 3.5.2

Slackware64 14.2

If I use:
cmake .. -DWITH_PERL=1 
-DFRIBIDI_INCLUDE_DIR='/usr/include/fribidi;/usr/include/glib-2.0;/usr/lib64/glib-2.0/include'

It compiles fine.  I thought I'd just report that this still seems to be a 
problem.

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

Re: [mapserver-users] Fwd: MS4W version 4.0.0 pre-release 'alpha' available

2016-06-28 Thread Andy Colson

On 06/28/2016 08:27 AM, Jeff McKenna wrote:

On 2016-06-28 10:14 AM, Andy Colson wrote:

On 06/28/2016 06:09 AM, Jeff McKenna wrote:

On 2016-06-27 10:16 PM, Andy Colson wrote:

On 06/27/2016 01:41 PM, Jeff McKenna wrote:

Forwarding to the MapServer community, to get feedback and testing
with PHP 7.  Thanks.  -jeff


 Forwarded Message 
Subject: Re: [MS4W-Users] version 4.0.0 pre-release 'alpha' available
Date: Mon, 27 Jun 2016 12:42:11 -0300
From: Jeff McKenna via MS4W-Users 
Reply-To: ms4w-us...@lists.ms4w.com
To: ms4w-us...@lists.ms4w.com
CC: Jeff McKenna 

Hello everyone,

Another alpha build (alpha3) is now available on the download server
(http://www.ms4w.com/release/experimental/), which contains PHP 7.0.8
as well as its extensions.  Thank you to those who had filed tickets
for specific PHP extensions (at http://ms4w.com/trac).  Note that most
of the extensions are loaded by default in PHP, so the best way to
check what extensions are included is through a phpinfo() call (there
is a 'phpinfo.php' file already included in /ms4w/apache/htdocs/
Technical users might want to check the configure command used when I
compiled this PHP, which is shown in the phpinfo() results (or here is
a screenshot, see the 5th row in the table:
http://pasteboard.co/1ZYfzJyX.png).  Don't be afraid to request
additional extensions through the MS4W tracker: http://ms4w.com/trac -
the time is now for feedback and requests.

PHP 7 is of course a big improvement (and I've invested almost 2
months of my time to rebuild the entire MS4W stack for PHP 7, which
requires the latest compiler).  You can check online for performance
improvements of PHP 7, most estimate 3X speed improvements with this
version (wow). An important note of course is that PHPMapScript is not
yet included in the alpha, as it definitely requires additional
development time and effort; so please please contact me directly if
your organization can help fund this effort.

Thank you for using MS4W.

-jeff

---

Please check the 'HISTORY.txt' file in the alpha, for a list of
changes in your alpha build.

To use these alpha builds, be sure to install the 'Microsoft Visual
C++ 2015 Redistributable Update 2
' package first (vc_redist.x86.exe):
https://www.microsoft.com/en-us/download/details.aspx?id=51682  An
important note: because of this new compiler, old systems running
Windows XP (and possible Windows Server 2003) can no longer be
supported.  But of course if need be, I can provide custom builds with
the old compiler for those organizations requiring that.

I realize that so many organizations (many on this mailing list) rely
heavily on MS4W, so please contact me directly to help support its
development with funding.  It is very important.

Below is a list of recent changes.  If you want the latest stable MS4W
release, please download last month's MS4W 3.1.4 release (from
http://ms4w.com/).

*

2016-06-27 Gateway Geomatics
   * ms4w version 4.0.0-alpha3 created. Notable changes are:

  - upgraded PHP to 7.0.8 with Visual Studio 2015 compiler
(trac ticket 5)
  - built additional PHP extensions with Visual Studio 2015
compiler:
pdo_mysql (trac ticket 52), pdo_oci, oci8, bzip2
  - rebuilt all GDAL plugins and bindings
  - moved CSharp, Java, Python bindings into folder
/ms4w/gdalbindings/
  - updated script /gdalbindings/python/test-cgi-mapscript.py
for Python 3

  *PHPMapScript will not work in this version, needs dev work
+ funding




Forgive my dumbness.  But.  Whats the point of PHP if PHPMapScript
doesnt work?

Even if it did work, what's the point when 90% of the time spent is
inside mapserver, of which 50% of that time is spent reading
.shp/PostGIS/.tiff/etc.

I'm all for PHP 7, please don't misunderstand, but this:


PHP 7 is of course a big improvement (and I've invested almost 2 months


Makes it sound like my gis hosting is going to be 3x faster.  But its
not.  Right?



Hi Andy,

Thanks for your positive feedback on all this work.

Alpha releases are for the MS4W community to test in advance - many
MS4W applications are based on PHP (GeoMOOSE, Mapbender, p.mapper,
...) so these builds help those developers and users prepare for PHP 7
in their sites.

Talk soon,

-jeff




Wow.  I was a bit dickish, huh.  Sorry about that.  Re-reading my post I
realize I was a bit hostile.

Perhaps I could re-ask and we could start over?  I am curious about
performance.

PHP 7 is faster, yes, but an average gis site spends more time inside
mapserver code than in php code, I assume, so the new performance
benefits of PHP 7 aren't going to speed up my site.  Is this assumption
correct?  Or might I see faster maps?

Sorry again, Jeff.


Thanks Andy, I think we both mean well.

It is true that at the moment I can't confirm yet all these sites with their 
"benchmarks&qu

Re: [mapserver-users] Fwd: MS4W version 4.0.0 pre-release 'alpha' available

2016-06-28 Thread Andy Colson

On 06/28/2016 06:09 AM, Jeff McKenna wrote:

On 2016-06-27 10:16 PM, Andy Colson wrote:

On 06/27/2016 01:41 PM, Jeff McKenna wrote:

Forwarding to the MapServer community, to get feedback and testing
with PHP 7.  Thanks.  -jeff


 Forwarded Message 
Subject: Re: [MS4W-Users] version 4.0.0 pre-release 'alpha' available
Date: Mon, 27 Jun 2016 12:42:11 -0300
From: Jeff McKenna via MS4W-Users 
Reply-To: ms4w-us...@lists.ms4w.com
To: ms4w-us...@lists.ms4w.com
CC: Jeff McKenna 

Hello everyone,

Another alpha build (alpha3) is now available on the download server
(http://www.ms4w.com/release/experimental/), which contains PHP 7.0.8
as well as its extensions.  Thank you to those who had filed tickets
for specific PHP extensions (at http://ms4w.com/trac).  Note that most
of the extensions are loaded by default in PHP, so the best way to
check what extensions are included is through a phpinfo() call (there
is a 'phpinfo.php' file already included in /ms4w/apache/htdocs/
Technical users might want to check the configure command used when I
compiled this PHP, which is shown in the phpinfo() results (or here is
a screenshot, see the 5th row in the table:
http://pasteboard.co/1ZYfzJyX.png).  Don't be afraid to request
additional extensions through the MS4W tracker: http://ms4w.com/trac -
the time is now for feedback and requests.

PHP 7 is of course a big improvement (and I've invested almost 2
months of my time to rebuild the entire MS4W stack for PHP 7, which
requires the latest compiler).  You can check online for performance
improvements of PHP 7, most estimate 3X speed improvements with this
version (wow). An important note of course is that PHPMapScript is not
yet included in the alpha, as it definitely requires additional
development time and effort; so please please contact me directly if
your organization can help fund this effort.

Thank you for using MS4W.

-jeff

---

Please check the 'HISTORY.txt' file in the alpha, for a list of
changes in your alpha build.

To use these alpha builds, be sure to install the 'Microsoft Visual
C++ 2015 Redistributable Update 2
' package first (vc_redist.x86.exe):
https://www.microsoft.com/en-us/download/details.aspx?id=51682  An
important note: because of this new compiler, old systems running
Windows XP (and possible Windows Server 2003) can no longer be
supported.  But of course if need be, I can provide custom builds with
the old compiler for those organizations requiring that.

I realize that so many organizations (many on this mailing list) rely
heavily on MS4W, so please contact me directly to help support its
development with funding.  It is very important.

Below is a list of recent changes.  If you want the latest stable MS4W
release, please download last month's MS4W 3.1.4 release (from
http://ms4w.com/).

*

2016-06-27 Gateway Geomatics
   * ms4w version 4.0.0-alpha3 created. Notable changes are:

  - upgraded PHP to 7.0.8 with Visual Studio 2015 compiler
(trac ticket 5)
  - built additional PHP extensions with Visual Studio 2015
compiler:
pdo_mysql (trac ticket 52), pdo_oci, oci8, bzip2
  - rebuilt all GDAL plugins and bindings
  - moved CSharp, Java, Python bindings into folder
/ms4w/gdalbindings/
  - updated script /gdalbindings/python/test-cgi-mapscript.py
for Python 3

  *PHPMapScript will not work in this version, needs dev work
+ funding




Forgive my dumbness.  But.  Whats the point of PHP if PHPMapScript
doesnt work?

Even if it did work, what's the point when 90% of the time spent is
inside mapserver, of which 50% of that time is spent reading
.shp/PostGIS/.tiff/etc.

I'm all for PHP 7, please don't misunderstand, but this:


PHP 7 is of course a big improvement (and I've invested almost 2 months


Makes it sound like my gis hosting is going to be 3x faster.  But its
not.  Right?



Hi Andy,

Thanks for your positive feedback on all this work.

Alpha releases are for the MS4W community to test in advance - many MS4W 
applications are based on PHP (GeoMOOSE, Mapbender, p.mapper, ...) so these 
builds help those developers and users prepare for PHP 7 in their sites.

Talk soon,

-jeff




Wow.  I was a bit dickish, huh.  Sorry about that.  Re-reading my post I 
realize I was a bit hostile.

Perhaps I could re-ask and we could start over?  I am curious about performance.

PHP 7 is faster, yes, but an average gis site spends more time inside mapserver 
code than in php code, I assume, so the new performance benefits of PHP 7 
aren't going to speed up my site.  Is this assumption correct?  Or might I see 
faster maps?

Sorry again, Jeff.

-Andy

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

Re: [mapserver-users] Fwd: MS4W version 4.0.0 pre-release 'alpha' available

2016-06-27 Thread Andy Colson

On 06/27/2016 01:41 PM, Jeff McKenna wrote:

Forwarding to the MapServer community, to get feedback and testing with PHP 7.  
Thanks.  -jeff


 Forwarded Message 
Subject: Re: [MS4W-Users] version 4.0.0 pre-release 'alpha' available
Date: Mon, 27 Jun 2016 12:42:11 -0300
From: Jeff McKenna via MS4W-Users 
Reply-To: ms4w-us...@lists.ms4w.com
To: ms4w-us...@lists.ms4w.com
CC: Jeff McKenna 

Hello everyone,

Another alpha build (alpha3) is now available on the download server 
(http://www.ms4w.com/release/experimental/), which contains PHP 7.0.8 as well 
as its extensions.  Thank you to those who had filed tickets for specific PHP 
extensions (at http://ms4w.com/trac).  Note that most of the extensions are 
loaded by default in PHP, so the best way to check what extensions are included 
is through a phpinfo() call (there is a 'phpinfo.php' file already included in 
/ms4w/apache/htdocs/  Technical users might want to check the configure command 
used when I compiled this PHP, which is shown in the phpinfo() results (or here 
is a screenshot, see the 5th row in the table: 
http://pasteboard.co/1ZYfzJyX.png).  Don't be afraid to request additional 
extensions through the MS4W tracker: http://ms4w.com/trac - the time is now for 
feedback and requests.

PHP 7 is of course a big improvement (and I've invested almost 2 months of my 
time to rebuild the entire MS4W stack for PHP 7, which requires the latest 
compiler).  You can check online for performance improvements of PHP 7, most 
estimate 3X speed improvements with this version (wow). An important note of 
course is that PHPMapScript is not yet included in the alpha, as it definitely 
requires additional development time and effort; so please please contact me 
directly if your organization can help fund this effort.

Thank you for using MS4W.

-jeff

---

Please check the 'HISTORY.txt' file in the alpha, for a list of changes in your 
alpha build.

To use these alpha builds, be sure to install the 'Microsoft Visual C++ 2015 
Redistributable Update 2
' package first (vc_redist.x86.exe): 
https://www.microsoft.com/en-us/download/details.aspx?id=51682  An important 
note: because of this new compiler, old systems running Windows XP (and 
possible Windows Server 2003) can no longer be supported.  But of course if 
need be, I can provide custom builds with the old compiler for those 
organizations requiring that.

I realize that so many organizations (many on this mailing list) rely heavily 
on MS4W, so please contact me directly to help support its development with 
funding.  It is very important.

Below is a list of recent changes.  If you want the latest stable MS4W release, 
please download last month's MS4W 3.1.4 release (from http://ms4w.com/).

*

2016-06-27 Gateway Geomatics
   * ms4w version 4.0.0-alpha3 created. Notable changes are:

  - upgraded PHP to 7.0.8 with Visual Studio 2015 compiler (trac ticket 
5)
  - built additional PHP extensions with Visual Studio 2015 compiler:
pdo_mysql (trac ticket 52), pdo_oci, oci8, bzip2
  - rebuilt all GDAL plugins and bindings
  - moved CSharp, Java, Python bindings into folder /ms4w/gdalbindings/
  - updated script /gdalbindings/python/test-cgi-mapscript.py for 
Python 3

  *PHPMapScript will not work in this version, needs dev work + funding




Forgive my dumbness.  But.  Whats the point of PHP if PHPMapScript doesnt work?

Even if it did work, what's the point when 90% of the time spent is inside 
mapserver, of which 50% of that time is spent reading .shp/PostGIS/.tiff/etc.

I'm all for PHP 7, please don't misunderstand, but this:


PHP 7 is of course a big improvement (and I've invested almost 2 months


Makes it sound like my gis hosting is going to be 3x faster.  But its not.  
Right?

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

[mapserver-users] Curved Geometries

2016-06-06 Thread Andy Colson

Hi all.

I see here:
http://www.gdal.org/drv_filegdb.html
and
http://www.gdal.org/drv_openfilegdb.html

that curves in .gdb aren't supported.

I'm getting more and more .gdb files, and more and more curves.  Anyone 
know a way to import them into PostGIS?  Or somehow render them in 
Mapserver?


My current strategy is to use ArcCatalog to convert them to .shp, then 
import the shapefile into PostGIS, but this sucks because I have to copy 
it all to a windows box ... and use ArcCatalog.


Thanks for your time,

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

Re: [mapserver-users] Improving Mapserver speed for air photo services

2015-05-31 Thread Andy Colson

Thanks Mark.  Mind if I ask a few more questions?

1) Have you found jpeg encoded tif to be a fast vs mrsid/ecw?  Does it even 
matter once you put the Mapcache in front?

2) How much drive space does your cache take compared to your imagery?


Thanks again,

-Andy

PS: sorry if this double posts.


On 05/28/2015 07:37 AM, Mark Volz wrote:

Hello,

Andy Colson asked me about my interactive mapping setup and how I was able to 
get the air photos to run fast.  I figure there may be a couple other people 
that might want to know what I did to improve the speed of my service at: 
http://geomoose.lyonco.org/geomoose2/geomoose.html#.  Please note that this 
list is not exhaustive, nor am I an expert.  So some people may want to add or 
refute some of this information.


*Use the same projection for everything.  Don't make MapServer have to deal 
with projecting imagery or data to a different coordinate system.
*Use a map cache.  Mapcache is integrated with some distributions of MapServer, 
but there are several out there each with their own advantages and 
disadvantages.
*Disable fractional zoom on your application.  In addition make sure your 
application is set up to use the same scales, tile size, and tile origin (grid) 
as your map cache.  If any of these don't match then your mapcache will need to 
perform extra work for each request.
*Search for "WMS Performance Shootout."  They are starting to get old now, but 
they contain many tidbits on how to improve speed.
*You may want to look at http://www.mapserver.org/optimization/raster.html.  
This page mentions what format you should use, and how to create internal tiles.
*Use PROCESSING "OVERSAMPLE_RATIO=1".  If I recall correctly MapServer uses an 
oversample ratio of 2.5 so it is sampling the raster at 180dpi to create a 72 dpi image.  
This is good for scientific applications, but it may be unnecessary for air photos.  Just 
be warned that low oversample ratios can create grainer images.

I think that by using a cache, making sure your application grid matches your cache, and 
configuring oversample_ratio=1 so MapServer doesn't need to do extra work will be more 
important than the actual server specs.  What you need for a server really depends on 
more factors.  Our server is "decent" now but we use to have an old GIS server 
that performed well with the above tips.



Sincerely,
Mark Volz, GISP
Lyon County GIS Coordinator



-Original Message-
From: Andy Colson [mailto:a...@squeakycode.net]
Sent: Wednesday, May 27, 2015 8:50 AM
To: Mark Volz; Rahkonen Jukka (MML)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] stretching imagery in MapServer

Hi Mark.  Two questions for you:

1) I know it might be a bunch of extra work, but I don't suppose you could post
some before and after shots (or urls or whatever).  I really have no idea what
sort of change your talking about.

2) Holy freaking cow you have fast imagery.  I don't suppose you could share
some processing/hardware/setup secrets?

Thanks

-Andy


On 5/26/2015 2:07 PM, Mark Volz wrote:

Jukka, (and others)

Thank you for your reply.  I think I figured out how lut works.  If
you don't mind please check and make sure I have this correct:

I can use ArcGIS to report the correct input and output values for a
n=2.5 standard deviation by going to
layers->symbology->stretch->histograms->Info window.  Once I have
layers->symbology->stretch->histograms->those
values I can modify my map file to include for example:

PROCESSING "LUT_1=73:0,226:255" #changes red band input of 0-73 to 0,
inputs of 226-255 to 255, inputs between 73-226 linearly interpolated.

PROCESSING "LUT_2=60:0,199:255" #changes green band input of 0-60 to
0, inputs of 199-255 to 255, inputs between 60-199 linearly interpolated.

PROCESSING "LUT_3=35:0,155:255" #changes blue band input of 0-35 to 0,
inputs of 155-255 to 255, inputs between 35-155 linearly interpolated.

P.S.

Before I knew what the heck I was doing with LUT I noticed that I
could identify wet areas, and tree cover quite easily with the
following
combinations:

PROCESSING "LUT=50:50,60:250,70:250" is a good way to identify tree

cover.


PROCESSING "LUT=50:50,60:250,70:70"  is a good way to identify wet areas.

Thank You

Sincerely,

*Mark Volz, GISP*

*From:*Rahkonen Jukka (MML)
[mailto:jukka.rahko...@maanmittauslaitos.fi]
*Sent:* Monday, May 25, 2015 9:18 AM
*To:* Mark Volz; mapserver-users@lists.osgeo.org
*Subject:* Re: stretching imagery in MapServer

Hi,

As far as I know automatic stretch by standard deviation is not
supported. You can do automatic min-max stretch with PROCESSING
"SCALE=AUTO". If your source data is uniform you may reach a good
result with manual scale settings or with PROCESSING "LUT=  "



-Jukka Rahkonen-

Mark Volz wrote:

Hello,

I added our new Pictometry Air Photos

Re: [mapserver-users] stretching imagery in MapServer

2015-05-27 Thread Andy Colson

Hi Mark.  Two questions for you:

1) I know it might be a bunch of extra work, but I don't suppose you 
could post some before and after shots (or urls or whatever).  I really 
have no idea what sort of change your talking about.


2) Holy freaking cow you have fast imagery.  I don't suppose you could 
share some processing/hardware/setup secrets?


Thanks

-Andy


On 5/26/2015 2:07 PM, Mark Volz wrote:

Jukka, (and others)

Thank you for your reply.  I think I figured out how lut works.  If you
don’t mind please check and make sure I have this correct:

I can use ArcGIS to report the correct input and output values for a
n=2.5 standard deviation by going to
layers->symbology->stretch->histograms->Info window.  Once I have those
values I can modify my map file to include for example:

PROCESSING "LUT_1=73:0,226:255" #changes red band input of 0-73 to 0,
inputs of 226-255 to 255, inputs between 73-226 linearly interpolated.

PROCESSING "LUT_2=60:0,199:255" #changes green band input of 0-60 to 0,
inputs of 199-255 to 255, inputs between 60-199 linearly interpolated.

PROCESSING "LUT_3=35:0,155:255" #changes blue band input of 0-35 to 0,
inputs of 155-255 to 255, inputs between 35-155 linearly interpolated.

P.S.

Before I knew what the heck I was doing with LUT I noticed that I could
identify wet areas, and tree cover quite easily with the following
combinations:

PROCESSING "LUT=50:50,60:250,70:250" is a good way to identify tree cover.

PROCESSING "LUT=50:50,60:250,70:70"  is a good way to identify wet areas.

Thank You

Sincerely,

*Mark Volz, GISP*

*From:*Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi]
*Sent:* Monday, May 25, 2015 9:18 AM
*To:* Mark Volz; mapserver-users@lists.osgeo.org
*Subject:* Re: stretching imagery in MapServer

Hi,

As far as I know automatic stretch by standard deviation is not supported. You can do 
automatic min-max stretch with PROCESSING "SCALE=AUTO". If your source data is 
uniform you may reach a good result with manual scale settings or with PROCESSING “LUT=  “



-Jukka Rahkonen-

Mark Volz wrote:

Hello,

I added our new Pictometry Air Photos on our mapping site at
http://geomoose.lyonco.org/geomoose2/geomoose.html.  The air photos seem
somewhat washed out.  In ArcGIS I was able to get a nicer looking image
by stretching the air photo using standard deviations. Can we stretch
imagery in MapServer?  If not please let me know if you have a comment
regarding how I can improve the image quality.

Thanks

Sincerely,

*Mark Volz, GISP*



___
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] static versus shared obj memory use

2015-05-15 Thread Andy Colson

Here is another stackoverflow:

http://stackoverflow.com/questions/2032779/will-multiple-instances-of-an-executable-built-with-static-libraries-share-any

mapserv can only share with itself.  Think of it as one file on disk 
equals one copy in ram.


-Andy


On 5/15/2015 4:34 PM, Richard Greenwood wrote:

Thanks for the reply Andy. I had Googled a bit and found this
stackoverflow
<http://stackoverflow.com/questions/2649334/difference-between-static-and-shared-libraries>
discussion in which the answer at the bottom said:

"The most significant advantage of shared libraries is that there is
only one copy of code loaded in memory, no matter how many processes
are using the library. For static libraries each process gets its
own copy of the code. This can lead to significant memory wastage."

But I'm not sure if that's applicable with a web/fcgi application.

rich

On Fri, May 15, 2015 at 3:04 PM, Andy Colson mailto:a...@squeakycode.net>> wrote:

On 5/15/2015 3:59 PM, Richard Greenwood wrote:

I'm working on Linux and have statically linked mapserv for
convenience
but now I'm wondering if it is adversely affecting memory use. For
example, if I have five fcgi mapserv instance like:
mapserv.fcgi?map=mapfile1.map
mapserv.fcgi?map=mapfile2.map
mapserv.fcgi?map=mapfile3.map
mapserv.fcgi?map=mapfile4.map
mapserv.fcgi?map=mapfile5.map
Am I using more memory with my static build than if they all
referencing
the shared libmapserver.so?

Thanks,
rich


I believe you will pay for the cost of one executable, the others
will share the code pages, but get their own data pages.

So no, you probably are not using more memory using static build.

-Andy




--
Richard W. Greenwood, PLS
www.greenwoodmap.com <http://www.greenwoodmap.com>


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


Re: [mapserver-users] static versus shared obj memory use

2015-05-15 Thread Andy Colson
"how many processes" is not very descriptive.  How many mapserve's vs 
how many different execuable.  Many mapserv's will share, but they wont 
share with any other executables.


ogr/gdal might be a good example.  You have ogr compiled into mapserv. 
Running many mapserv's will all share the same code page in ram. 
However ogrinfo, ogr2ogr, etc wont be able to share with mapserv.


-Andy


On 5/15/2015 4:34 PM, Richard Greenwood wrote:

Thanks for the reply Andy. I had Googled a bit and found this
stackoverflow
<http://stackoverflow.com/questions/2649334/difference-between-static-and-shared-libraries>
discussion in which the answer at the bottom said:

"The most significant advantage of shared libraries is that there is
only one copy of code loaded in memory, no matter how many processes
are using the library. For static libraries each process gets its
own copy of the code. This can lead to significant memory wastage."

But I'm not sure if that's applicable with a web/fcgi application.

rich

On Fri, May 15, 2015 at 3:04 PM, Andy Colson mailto:a...@squeakycode.net>> wrote:

On 5/15/2015 3:59 PM, Richard Greenwood wrote:

I'm working on Linux and have statically linked mapserv for
convenience
but now I'm wondering if it is adversely affecting memory use. For
example, if I have five fcgi mapserv instance like:
mapserv.fcgi?map=mapfile1.map
mapserv.fcgi?map=mapfile2.map
mapserv.fcgi?map=mapfile3.map
mapserv.fcgi?map=mapfile4.map
mapserv.fcgi?map=mapfile5.map
Am I using more memory with my static build than if they all
referencing
the shared libmapserver.so?

Thanks,
rich


I believe you will pay for the cost of one executable, the others
will share the code pages, but get their own data pages.

So no, you probably are not using more memory using static build.

-Andy




--
Richard W. Greenwood, PLS
www.greenwoodmap.com <http://www.greenwoodmap.com>


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


Re: [mapserver-users] static versus shared obj memory use

2015-05-15 Thread Andy Colson

On 5/15/2015 3:59 PM, Richard Greenwood wrote:

I'm working on Linux and have statically linked mapserv for convenience
but now I'm wondering if it is adversely affecting memory use. For
example, if I have five fcgi mapserv instance like:
   mapserv.fcgi?map=mapfile1.map
   mapserv.fcgi?map=mapfile2.map
   mapserv.fcgi?map=mapfile3.map
   mapserv.fcgi?map=mapfile4.map
   mapserv.fcgi?map=mapfile5.map
Am I using more memory with my static build than if they all referencing
the shared libmapserver.so?

Thanks,
rich



I believe you will pay for the cost of one executable, the others will 
share the code pages, but get their own data pages.


So no, you probably are not using more memory using static build.

-Andy

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


Re: [mapserver-users] double check - recommended way to optimize air photos for speed in MapServer while maintaining a decent quality and file size.

2015-02-10 Thread Andy Colson

On 02/10/2015 01:25 PM, Mark Volz wrote:

Hello,

In the past I prepared my air photos for MapServer by converting them into 
GeoTiff and creating compressed jpeg overviews.  I would like to double check 
if this is still a recommended method to prepare air photos that are fast, have 
a decent amount of quality, and are not terribly large.  If anyone has any 
comments on how I should prepare air photos for MapServer and possibly ArcGIS 
or QGIS let me know.

Here is what I used in the past, which seems to work good:

gdal_translate -CO TILED=YES -CO PHOTOMETRIC=YCBCR -CO TFW=YES -CO 
COMPRESS=JPEG -CO BIGTIFF=YES MNPIPE13-SID-9INCH.sid Pipe13.tif

gdaladdo -r cubic --config compress_overview JPEG --config photometric_overview 
YCBCR Pipe2013.tif 2 4 8 16 32 64 128 256 512 1024

I will be provided an ECW file, Mr Sid file, and I will be given the choice of 
getting either 775 individual jpg or tiff tiles.

Thanks for any advice.

*Mark Volz*
>


Its what I'm using, but I'm setting jpeg_quality much lower than the default.  
I ran several at different qualities and found next to no difference when 
zoomed all the way in.  For the gdaladdo I reduce the quality even more, 
because when your zoomed out, who cares if you can't make out an individual 
car.  I'm using:

gdal_translate -of GTiff \
  -co compress=jpeg \
  -co JPEG_QUALITY=60 \
  -co PHOTOMETRIC=YCBCR \
  -co tiled=yes \
  -co bigtiff=yes \
  --config GDAL_CACHEMAX 500 \
  src dest

gdaladdo -ro -r average \
  --config COMPRESS_OVERVIEW JPEG \
  --config JPEG_QUALITY_OVERVIEW 40 \
  --config PHOTOMETRIC_OVERVIEW YCBCR \
  --config INTERLEAVE_OVERVIEW PIXEL \
  --config GDAL_CACHEMAX 500 \
  dest \
  2 4 8 16 32 64 128 256 512 1024 2048 4096

I think (but no real measure) that too many small files or very few big files 
are slower than 12'ish files.  But that's just a gut feeling.

My Tama Iowa imagery is 30 gig, in 12 .tif files:

http://maps.camavision.com/map/tamaia?pin=14.27.203.003

The EWC version is 22 gig.  performance wise, when zoomed in as close as 
possible (car level), the ecw and tiff perform about the same.  When zoomed all 
the way out (entire county), once I added 2048 and 4096 to my gdaladdo, the 
tiff was almost a second faster than ecw.

If there are newer/better methods I'd be interested in them too.

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


Re: [mapserver-users] compiling error core.c in mapcache with cygwin

2015-01-10 Thread Andy Colson

I found a simple c test here:

http://dev.ariel-networks.com/apr/apr-tutorial/html/apr-tutorial-16.html

links to the test .c here:

http://dev.ariel-networks.com/apr/apr-tutorial/sample/thread-sample.c

I compiled it with:

gcc -Wall $(apr-1-config --cflags --cppflags --includes --link-ld)  
thread-sample.c

and ./a.out ran fine.  (I'm on slackware linux though.  I don't have a windows 
box handy)

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


Re: [mapserver-users] compiling error core.c in mapcache with cygwin

2015-01-10 Thread Andy Colson

On 01/10/2015 08:23 AM, Gery wrote:

sorry for bumping this post, but any clues about this issue with core.c? any
ideas how to solve this core.c error message with the cygwin details I
previously posted?

It'd be great your support on this, thanks in advance.



Sorry, no idea.

If you wanted to check some things:

near the top of core.c, there are probably includes for apr.  You could make 
sure they are actually included for cygwin (ifdef's for example).  (It could 
also be in core.h if there is one)

You could also make sure you dont have any duplicate apr headers.  Maybe one of 
your headers has the same name as one of theirs and your's is being included 
instead of the apr one.  Maybe old copies of apr headers lying around?

Does cygwin apr even support threads?  Maybe a quick test.c that includes apr 
and tries to use apr_thread_t might help.

-Andy

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


Re: [mapserver-users] mapcache compile issue on cygwin posted on stackoverflow

2015-01-06 Thread Andy Colson

On 1/5/2015 5:36 PM, Stephen Woodbridge wrote:

I saw this issue come up on stackoverflow:
http://stackoverflow.com/questions/27755442/compiling-error-core-c-in-mapcache-with-cygwin/27760401


Anyone have any other ideas?

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


Yea, if he didnt have apr installed, I'd expect to see "cannot find 
header" errors.


So if it found the headers .. why wouldn't the header contain 
apr_thread_t?  Wrong version maybe?


The mapcache page doesnt say anything about cygwin.  They say it 
compiles with visual studio though.



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


Re: [mapserver-users] compiling error core.c in mapcache with cygwin

2015-01-03 Thread Andy Colson

On 01/03/2015 08:08 AM, Gery . wrote:

Hello,

When installing mapcache in cygwin, `make` produced:

 /opt/mapcache/mapcache-rel-1-2-1/lib/core.c: In function 
‘mapcache_prefetch_tiles’:
 /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:81:3: error: unknown type name 
‘apr_thread_t’
apr_thread_t **threads;
^
 /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:82:3: error: unknown type name 
‘apr_threadattr_t’
apr_threadattr_t *thread_attrs;
^
 /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:83:7: warning: unused variable 
‘nthreads’ [-Wunused-variable]
int nthreads;
^
 /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:82:21: warning: unused 
variable ‘thread_attrs’ [-Wunused-variable]
apr_threadattr_t *thread_attrs;
  ^
 /opt/mapcache/mapcache-rel-1-2-1/lib/core.c:81:18: warning: unused 
variable ‘threads’ [-Wunused-variable]
apr_thread_t **threads;
   ^

I searched for some hints about this error but didn't find anything. Looking 
for `apr_thread_t` and cygwin, I found some pages pointing to an error with 
apache, but not really sure if apache has something to do here.

thanks for any hints on this,

Gery


You need the Apache Portable Runtime library.  Its a generic lib, not the 
webserver.

This gives an overview of all the area's it covers:

http://apr.apache.org/docs/apr/1.4/modules.html



-Andy

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

Re: [mapserver-users] Bulk creation of mapfile

2014-08-14 Thread Andy Colson

On 8/13/2014 8:03 AM, Alex Lopes wrote:

Hi Everybody,


I need to create a script shell to build thousands of mapfiles based on
postgis layers.

Which is the best way to accomplish this task?

Best regards,
Alex



On a side note, if you don't mind me asking, I'm curious, why thousands 
of layers?  Do users ever even look at them all?  If a person cannot 
look at them all what do you use them for?


-Andy



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


Re: [mapserver-users] MapServer Errors in APACHE logs.

2014-04-29 Thread Andy Colson

On 4/29/2014 1:55 PM, Basques, Bob (CI-StPaul) wrote:

All,

Has anyone done any work with capturing MapServer errors in APACHE?
Specifically I want to be able to tell the difference between a
MapServer mis-config (textual error page) and a successful image
response.   The idea is to somehow log those textual message responses
in an automated way through Apache.

I’m pretty sure I could make my own custom logfile for MapServer (CGI)
calls, but not so sure about textual response vs raster response
filters, at least from the APACHE point of view . . ..  Is a MapServer
Text based error page considered for inclusion in the Apache error log or??

Thanks.

Bobb




Have you checked your apache error log?  I'm running perl as fastcgi, 
and I get things like:


mod_fcgid: stderr:  maps.pl: msWMSLoadGetMapParams(): WMS server error. 
Invalid layer(s) given in the LAYERS parameter. A layer might be 
disabled for this request. Check wms/ows_enable_request settings.


The text vs raster response is only for sending errors to the browser, 
it wont affect whats written to the error log.


I think writing a thing to watch the error log is your best bet.  You 
could "simulate" some errors and see how it shows up in the error log.


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


Re: [mapserver-users] MapServer Errors in APACHE logs.

2014-04-29 Thread Andy Colson


On 4/29/2014 2:51 PM, Schweitzer, Peter wrote:> I think the problem is 
that mapserver is a CGI program, not a module

> of Apache.  If it were a module of Apache (for example, PHP) then its
> error report could be sent to the Apache error log.  But as a separate
> process, it doesn't have access to the Apache log system.  OCICBW
>


I'm pretty sure you can write to stderr in cgi and apache will dump it 
to the error log.


http://httpd.apache.org/docs/current/logs.html

search for stderr

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


Re: [mapserver-users] Beginning MapServer User needs help

2014-04-24 Thread Andy Colson

On 4/24/2014 1:25 PM, Deborah Traver wrote:

Is anyone willing to help me figure out my issues? I am doing a tutorial
on gistutor.com/mapserver
,
and have followed it to the tee. I am a ms4w user. Mapserver and apache
are installed correctly. I imagine I am making a small mistake somewhere
in my MapFile &/or html. I tried sending a more detailed email, but it
was too large to send. I can send more info to anyone that has a few
minutes for me.

Cheers,
Deb


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



A great place to look is the apache error.log.  If you have syntax 
errors there is a good chance they'll be displayed in the error.log


-Andy

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


Re: [mapserver-users] Raster Data

2014-03-12 Thread Andy Colson

On 3/12/2014 9:42 AM, jcwalz wrote:

Hello,

I have a png raster image that I am adding to GeoMOOSE and it is about 3GB
in size. It takes about 10 minutes for the image to show up because the file
is so large. What is the best way of dealing with large images like this?

Thanks,

Jenna




I'm assuming that file has no overlays, so it has to read the entire file.

Converting it to ecw or sid will compress the file and make it faster to 
render at different zoom levels.  ecw and sid might require $$ though.


Another alternative is to use jpeg encoded tiff, which will create a 
smaller file, and then build overlays on top of it.


I'm using something like this to convert my imagery:

gdal_translate -of GTiff -co compress=jpeg -co JPEG_QUALITY=80 -co 
PHOTOMETRIC=YCBCR -co tiled=yes -co bigtiff=yes 
../ecw1/ortho_1-1_1n_s_sd031_2012_1.ecw  ortho_1-1_1n_s_sd031_2012_1.ecw.tif



gdaladdo -ro --config COMPRESS_OVERVIEW JPEG --config 
PHOTOMETRIC_OVERVIEW YCBCR --config INTERLEAVE_OVERVIEW PIXEL 
ortho_1-1_1n_s_sd031_2012_1.tif 2 4 8 16 32 64



Thats two commands.  Each command should be all one one line.  I have 
had some problems with my overlays being larger than 4 gig.  (gdaladdo 
does support --config BIGTIFF_OVERVIEW YES, but I've had problems with it)



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


Re: [mapserver-users] custom programming with Mapserver's python or java or C# (OR perl) mapscript

2014-01-06 Thread Andy Colson

On 1/6/2014 6:34 AM, Sajid Anwar wrote:

Hello,

I am wondering how to write a program (function) for Map server, which
dynamically handle arbitrary shapefile, and will change the style like
color etc, on the basis of attribute from shapefile. I want to develop
and rendered choropleth map for arbitrary shapefile.

I know that we can use MapScript languge like python for custom
programming, and I already read some tutorial about python mapscript. I
need help/direction about which scripting language is easy to use and
more flexible and from where to start ,other link without Map-server
website and example.


I already use the Map file in cgi mode, but it is static and here we
manually change the file(metadata) for each shape file. i am interested
in a function /program which can handle styling for arbitrary shapefile.


Thanks in advance


sajid

student



All languages are the same, and can do the same thing.  The question is 
not "which language is more flexable", but "which language do I know the 
best", or "what language would I enjoy learning for this project".


I choose Perl.  Not because of all the rave reviews it gets, or its 
massive popularity, but because I know perl, I love it, I think in it.


So pick a language that mapscript supports.  I can offer you the ideas I 
used to write my site, and you can implement them in any language.


I use mod_perl, FastCGI, and uwsgi... all of which are pretty similar.

I start out with a url like:
http://maps.camavision.com/map/iowacityia

I pull off the last word and stuff that into $xmap.
Then I check the url for ether WMS or info, and if not found, I return a 
suitable index.html file:


my $filename = MAPPATH."/$xmap.map";
my $map = new mapscript::mapObj($filename);

MAPPATH is outside the htdocs folder.

Then, I've had reports where people have huge monitors so I need to make 
sure the maxsize if at least 4096.  I didnt want to check all my .map 
files, so I just check in mapscript:


if ($map->{maxsize} < 4096)
{
$map->{maxsize} = 4096;
}

I load various values from the map file, like the bounding box:
my $bbox = $map->{extent};
$vars{'minx'} = $bbox->{minx};
$vars{'miny'} = $bbox->{miny};
$vars{'maxx'} = $bbox->{maxx};
$vars{'maxy'} = $bbox->{maxy};

I generate some javascript for the index.html page:
	$zoom = "var bb = new  OpenLayers.Bounds.fromArray([$vars{'minx'}, 
$vars{'miny'}, $vars{'maxx'}, $vars{'maxy'}]);\n"

. "\t\t\tmap.zoomToExtent(bb, true);\n";

And then I send it to the browser:
  my $index = $config{$xmap}->{'index'} // 'index.html';
  showTemplate($index, \%vars);

This page will include the openlayers stuff and setup to render the map. 
 openlayers will turn around and request map images using the url param 
WMS.


My code, when it sees a WMS requst does this:

$owreq = new mapscript::OWSRequest();
my @par = $web->paramNames();
for my $x (@par)
{
my $v = $web->param($x);
$owreq->setParameter($x, $v);
}
my $map = new mapscript::mapObj( MAPPATH."/$xmap.map" );

It creates a request object, and copies all the url params into the owreq.

And here is the part you will like.  If you pass along a parcel number:
http://maps.camavision.com/map/iowacityia?pin=1004178001

It dynamically creates a layer called annotate_pin (which is the blue 
highlight):


if ($layername =~ 'annotate_pin')
{
# did we get a click point?
my $cx = $web->param('LON');
my $cy = $web->param('LAT');
if ( defined($cx) && defined($cy))
{
$xpin = getPin($cx, $cy);
}

$q = $db->prepare("select shapeid from $xmap.getpoint where pin = 
\$1");
$q->execute($xpin);

my $layer = $map->getLayerByName('parcels');
$layer->open();
my $newlayer = $map->getLayerByName('annotate_pin');
$newlayer->{status} = $mapscript::MS_ON;

my $shp;
($sid) = $q->fetchrow_array;
if (defined($sid))
{
$shp = $layer->getShape(new mapscript::resultObj($sid));

}
$q = undef;
$layer->close();
my $shape = $shp->clone();
$newlayer->addFeature($shape);
}

In the .map file, the layer annotate_pin exists, but is mostly empty. 
It only contains a STYLE for drawing, but no data.  I find the shape 
from the parcels layer, clone it (just that one parcel) and add it to 
the annotate_pin layer.


This code is not the exact code I run.  I striped out a bunch to try and 
make it more readable.  On click of another parcel it sends an info url, 
which does almost the exact same thing to move the highlight.


Also, you can see I'm doing queries to PostGIS

Re: [mapserver-users] MapServer 6.4 Released

2014-01-04 Thread Andy Colson

On 17 September 2013 22:55, andy  wrote:

I start with:

cmake -DCMAKE_INSTALL_PREFIX=/tmp/map  -DWITH_PERL=1  ..

it runs ok, and displays:

-- Will install files to /tmp/map
-- Configuring done
-- Generating done

then I run make, which compiles fine.  But "make install" has a problem
with mapscript and tries to copy it to /usr/local/lib64, not /tmp/map.

-- Installing: /usr/local/lib64/perl5/auto/mapscript/mapscript.so
CMake Error at mapscript/perl/cmake_install.cmake:38 (FILE):
file INSTALL cannot copy file



In mapscript/perl/CMakeLists.txt, how about stripping the leading '/' so
that INSTALL() has a relative path instead of absolute:

set(CUSTOM_PERL_SITE_ARCH_DIR ${PERL_SITEARCH} CACHE DIR "Custom
installation directory for perl binary extension
# strip leading slash so INSTALL() uses CMAKE_INSTALL_PREFIX
string(SUBSTRING ${CUSTOM_PERL_SITE_ARCH_DIR} 1 -1
CUSTOM_PERL_SITE_ARCH_DIR)


Maybe?

-Andy



On 09/24/2013 04:51 AM, thomas bonfort wrote:> Disclaimer: I might have no idea 
of what I'm talking about given I'm

no mapscript or perl user or expert.
I'm a bit weary of applying this one. We'll install to the directory
required by the current perl installation, which is independent of the
prefix path. I believe you can supply CUSTOM_PERL_SITEARCH_DIR on the
command line if you want to install somewhere else, correct?

--
thomas



I finally got back to this little project, and turns out the answer is not to 
use CMAKE_INSTALL_PREFIX.

Instead, use:
cmake .. -DWITH_PERL=1

Then use DESTDIR (just like you used to in prior version):
make install DESTDIR=/tmp/map

Everything installs to the tmp folder, and I can create a package from there.

Also, I can report, that my test box upgraded and ran ok with 6.4.1 (although I 
have not tested extensively).

-Andy

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


Re: [mapserver-users] FastCGI with multiple map files

2014-01-03 Thread Andy Colson

On 1/3/2014 4:08 PM, Richard Greenwood wrote:

I'm running FastCGI but I'm not sure that I have it configured
optimally, or even correctly. I have about a dozen map files. My
requests look like:
mapserv.fcgi?map=abc.map&...
mapserv.fcgi?map=def.map&...
mapserv.fcgi?map=ghi.map&...
Does FCGI know to cache each map file so that I have a FCGI thread(s)
for each map file? Or do I just have FCGI threads that are re-reading
which ever map file is needed? Would I do better with a small script
wrapper around each mapserv+mapfile like:
abc.fcgi
def.fcgi
ghi.fcgi
Sorry - I don't feel like I'm articulating my question very well.

Rich

--
Richard Greenwood
richard.greenw...@gmail.com 
www.greenwoodmap.com 


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



I believe it'll reload the .map file every request.  But, your OS should 
cache it so you wont actually be hitting disk, and reading/parsing a 
.map file is very quick.  I think this is pretty far down on the list of 
things to optimize.  (Well, thats my opinion.  I've never actually timed it)


-Andy

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


[mapserver-users] mapserver debug raster overview size

2013-12-22 Thread Andy Colson
I have some large aerial imagery (15 gig of mrsid).  I tried to convert 
it to geotiff with compress=lzw, but it comes out to 67 gig, without 
overviews.  So I won't be using that.


To test different options, I choose a 2.4 file and tried with 
compress=jpeg (and photometric=ycbcr) and the resulting file is 4.6 gig, 
with external overview file about 3 gig.  I only choose levels 2 4 8 and 
16, because that's whats in the example I found.


So my question is, how do I know what levels I should choose?

I turned on mapfile debugging and CPL_DEBUG hoping it would say 
something simple like "overview not found!".


perhaps it does tell me something though, but I'm not sure what.  Does 
any of this info tell me what overview it choose:


msDrawRasterLayerLow(arial2): entering.
GDAL: GDALOpen(/pub/maps/PhelpsMO/a2/phelpsmo_B2.tif, this=0x1a12060) 
succeeds as GTiff.

msResampleGDALToMap in effect: cellsize = 0.390799
msDrawGDAL(arial2): using RAW_WINDOW=86196 23174 10678 6869, 
dst=0,0,3549,2283

msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,0
GDAL: GDALDefaultOverviews::OverviewScan()
GDAL: GDALOpen(/pub/maps/PhelpsMO/a2/phelpsmo_B2.tif.ovr, 
this=0x1a2ea60) succeeds as GTiff.

GTiff: ScanDirectories()
GTiff: Opened 37308x51730 overview.
GTiff: Opened 18654x25865 overview.
GTiff: Opened 9327x12933 overview.
GDAL: GDALClose(/pub/maps/PhelpsMO/a2/phelpsmo_B2.tif, this=0x1a12060)
GDAL: GDALClose(, this=0x1a2f430)
GDAL: GDALClose(, this=0x1a2f8a0)
GDAL: GDALClose(, this=0x1a316c0)
GDAL: GDALClose(/pub/maps/PhelpsMO/a2/phelpsmo_B2.tif.ovr, this=0x1a2ea60)
msDrawMap(): Layer 2 (arial2), 2.801s


I think the  RAW_WINDOW=86196 23174 10678 6869, dst=0,0,3549,2283 might 
have some useful info.. but I don't know what it means.


And I see it scanned through the overview's, but did it use any of them? 
 Which did it choose?


Any hints?

Thanks for your time,

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


Re: [mapserver-users] mapserver is slow on production machine

2013-11-07 Thread Andy Colson

On 11/07/2013 03:52 PM, Mark Volz wrote:

Hello,

Could anyone offer me tips on why Mapserver (MS4W) is running significantly 
slower on a production machine as compared to the development machine.  In 
particular Apache is taking up 50% of the processor.  I am using mapcache.

Thanks

Lyon County, MN
(507) 532-8218


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



Are you hitting aerial imagery?  I've noticed some of my imagery requires a lot 
of cpu time to decompress, reproject, whatever else it does, and ship off.

If you can pin it down to a specific layer, you could turn on the debug logging 
which includes timing.

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


Re: [mapserver-users] Access network share drive for data in mapfile throwing error

2013-03-07 Thread Andy Colson

On 3/7/2013 9:48 AM, Sowmya Tiramdasu wrote:

Hi,

   I am trying to access data directly from a network share folder in my
mapfile. But it is not working . It is throwing the following error.

msDrawMap(): Image handling error. Failed to draw layer named
'ControlPoints'.

msShapefileOpen(): Unable to access file.
(\DISKSTATION1\data\SheridanData\Keeneland\Vector Data\Geographic
Control Points\Geographic Control Points.shp)

msShapefileOpen(): Unable to access file.
(\DISKSTATION1\data\SheridanData\Keeneland\Vector Data\Geographic
Control Points\Geographic Control Points.shp)

msSHPLayerGetItems(): Shapefile error. Shapefile layer has not been opened.

KmlRenderer::startNewLayer: General error message. msLayerOpen failed

msShapefileOpen(): Unable to access file.
(\DISKSTATION1\data\SheridanData\Keeneland\Vector Data\Geographic
Control Points\Geographic Control Points.shp)

msShapefileOpen(): Unable to access file.
(\DISKSTATION1\data\SheridanData\Keeneland\Vector Data\Geographic
Control Points\Geographic Control Points.shp)

I tried to search in the old email archives. In one of the email chains
they suggested me to check if gdal/ogr can actually open the files. I
did gdal info for tiff files and they are giving the right information.
Similarly ogrinfo for shp files and they too are fine.

Can anyone please suggest what is the problem and give me solution to
fix this. Find below snapshot of my mapfile for your reference.

LAYER

 NAME KeenelandStatePlane38

 DATA
"\\DISKSTATION1\data\SheridanData\Keeneland\Imagery\StatePlane\SPSPSPO-00039.tif"

 STATUS   OFF

 TYPE RASTER

 OPACITY 75

 PROJECTION

 "init=EPSG:102679"

 END

 DEBUG 5

 END

 LAYER

 NAME ControlPoints
#Photogrammetric points

 DATA
"\\DISKSTATION1\data\SheridanData\Keeneland\Vector Data\Geographic
Control Points\Geographic Control Points.shp"

 STATUS   OFF

 TYPE POINT

 CLASS

 STYLE

 #
Symbol to be used (reference)

 SYMBOL
"circle"

 # Size
of the symbol in pixels

 SIZE 8

 COLOR
190 20 190

 #
Outline colour (RGB) - black


OUTLINECOLOR 0 0 0

 END

 END

 PROJECTION

 "init=epsg:102679"

 END

 END

Thanks in advance,

Sowmya.


The error: Unable to access file. (\DISKSTATION1\..

Is missing a slash on front.  Maybe in your mapfile, try three slashes 
up front:


>DATA "\\\DISKSTATION1\data...


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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-14 Thread Andy Colson
It works!  My package build script ran as-is, the libs link ok, and my 
maps serve correctly from apache.


Thank you much.

-Andy


On 2/14/2013 9:43 AM, Andy Colson wrote:

Ok, got it.

inside mapscript/perl, make clean didnt remove mapscript_wrap.c.  I
manually removed it, then make clean'ed everywhere.  Then started over,
and it compiled clean.

On to testing...

-Andy

On 2/14/2013 9:19 AM, Umberto Nicoletti wrote:

make clean

fixed it for me
Umberto




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


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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-14 Thread Andy Colson

Ok, got it.

inside mapscript/perl, make clean didnt remove mapscript_wrap.c.  I 
manually removed it, then make clean'ed everywhere.  Then started over, 
and it compiled clean.


On to testing...

-Andy

On 2/14/2013 9:19 AM, Umberto Nicoletti wrote:

make clean

fixed it for me
Umberto




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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-14 Thread Andy Colson
You mean make clean and then start over?  or a make clean at some 
strategic point?


Assuming make clean and start over:

andy@mapper:/pub/apps/mapserver$ git status
# On branch branch-6-2
nothing to commit (working directory clean)

then configure and make worked ok, but in mapscript/perl I got the same 
error's.


-Andy


On 2/14/2013 9:19 AM, Umberto Nicoletti wrote:

make clean

fixed it for me
Umberto


On Thu, Feb 14, 2013 at 3:48 PM, Andy Colson mailto:a...@squeakycode.net>> wrote:

On 2/14/2013 8:09 AM, Umberto Nicoletti wrote:

It's in the 6.2 branch, please review it:


https://github.com/mapserver/__mapserver/commit/__a4ac07d8da7d81f42090890a7e359b__dc1f277dbf

<https://github.com/mapserver/mapserver/commit/a4ac07d8da7d81f42090890a7e359bdc1f277dbf>

Umberto



Mmm.. No, that didnt seem to work.

andy@mapper:/pub/apps/__mapserver$ git branch
* branch-6-2
   master



top level ./configure and make went ok, then:

andy@mapper:/pub/apps/__mapserver$ cd mapscript/perl

andy@mapper:/pub/apps/__mapserver/mapscript/perl$ perl Makefile.PL
-I/pub/apps/mapserver -I/usr/local/include -I/usr/include
-L/usr/lib -L/pub/apps/mapserver/.libs -lmapserver
-rpath /usr/lib -lmapserver -lfreetype -lz -lbz2 -L/usr/lib64 -lgd
-lproj -ljpeg -lpng -lgif -L/usr/local/lib -lgdal
-L/usr/local/pg92/lib -lpq -L/usr/lib64 -lgeos_c -lc -lm -ldl -lstdc++
6.2.0
Writing Makefile for mapscript
Writing MYMETA.yml and MYMETA.json

andy@mapper:/pub/apps/__mapserver/mapscript/perl$ make
cp mapscript.pm <http://mapscript.pm> blib/lib/mapscript.pm
<http://mapscript.pm>
cc -c  -I/pub/apps/mapserver -I/usr/local/include -I/usr/include
-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -fPIC   -DVERSION=\"6.2.0\"
-DXS_VERSION=\"6.2.0\" -fPIC "-I/usr/lib64/perl5/CORE"
  -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR
-DUSE_WMS_SVR -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL
-DUSE_OGR -DUSE_GEOS -DHAVE_SYNC_FETCH_AND_ADD -DUSE_PROJ -DUSE_GD
-DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_GIF -DUSE_ICONV -DUSE_JPEG
-DUSE_GIF -DUSE_PNG -DUSE_FREETYPE -DHAVE_VSNPRINTF -DNEED_STRLCPY
-DNEED_STRLCAT -DNEED_STRRSTR -DDISABLE_CVSID mapscript_wrap.c
mapscript_wrap.c: In function '_wrap_scaleTokenEntryObj___minscale_set':
mapscript_wrap.c:21664:5: error: unknown type name 'scaleTokenEntryObj'
mapscript_wrap.c:21664:33: error: 'scaleTokenEntryObj' undeclared
(first use in this function)
mapscript_wrap.c:21664:33: note: each undeclared identifier is
reported only once for each function it appears in
mapscript_wrap.c:21664:53: error: expected expression before ')' token
mapscript_wrap.c:21680:33: error: expected expression before ')' token
...Lots more...



_
mapserver-users mailing list
mapserver-users@lists.osgeo.__org
<mailto:mapserver-users@lists.osgeo.org>
http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
<http://lists.osgeo.org/mailman/listinfo/mapserver-users>




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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-14 Thread Andy Colson

On 2/14/2013 8:09 AM, Umberto Nicoletti wrote:

It's in the 6.2 branch, please review it:

https://github.com/mapserver/mapserver/commit/a4ac07d8da7d81f42090890a7e359bdc1f277dbf

Umberto




Mmm.. No, that didnt seem to work.

andy@mapper:/pub/apps/mapserver$ git branch
* branch-6-2
  master



top level ./configure and make went ok, then:

andy@mapper:/pub/apps/mapserver$ cd mapscript/perl

andy@mapper:/pub/apps/mapserver/mapscript/perl$ perl Makefile.PL
-I/pub/apps/mapserver -I/usr/local/include -I/usr/include
-L/usr/lib -L/pub/apps/mapserver/.libs -lmapserver
-rpath /usr/lib -lmapserver -lfreetype -lz -lbz2 -L/usr/lib64 -lgd 
-lproj -ljpeg -lpng -lgif -L/usr/local/lib -lgdal -L/usr/local/pg92/lib 
-lpq -L/usr/lib64 -lgeos_c -lc -lm -ldl -lstdc++

6.2.0
Writing Makefile for mapscript
Writing MYMETA.yml and MYMETA.json

andy@mapper:/pub/apps/mapserver/mapscript/perl$ make
cp mapscript.pm blib/lib/mapscript.pm
cc -c  -I/pub/apps/mapserver -I/usr/local/include -I/usr/include 
-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 
-fPIC   -DVERSION=\"6.2.0\" -DXS_VERSION=\"6.2.0\" -fPIC 
"-I/usr/lib64/perl5/CORE"  -DHAVE_VSNPRINTF -DNEED_STRLCPY 
-DNEED_STRLCAT -DNEED_STRRSTR -DUSE_WMS_SVR -DUSE_POSTGIS 
-DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_GEOS 
-DHAVE_SYNC_FETCH_AND_ADD -DUSE_PROJ -DUSE_GD -DUSE_GD_PNG -DUSE_GD_JPEG 
-DUSE_GD_GIF -DUSE_ICONV -DUSE_JPEG -DUSE_GIF -DUSE_PNG -DUSE_FREETYPE 
-DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT -DNEED_STRRSTR 
-DDISABLE_CVSID mapscript_wrap.c

mapscript_wrap.c: In function '_wrap_scaleTokenEntryObj_minscale_set':
mapscript_wrap.c:21664:5: error: unknown type name 'scaleTokenEntryObj'
mapscript_wrap.c:21664:33: error: 'scaleTokenEntryObj' undeclared (first 
use in this function)
mapscript_wrap.c:21664:33: note: each undeclared identifier is reported 
only once for each function it appears in

mapscript_wrap.c:21664:53: error: expected expression before ')' token
mapscript_wrap.c:21680:33: error: expected expression before ')' token
...Lots more...


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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-13 Thread Andy Colson

Yep, exactly what I hit.

And if there is a patch for it, I'll just wait on my packaging.  Awesome!

Thanks

-Andy


On 2/13/2013 2:25 PM, Umberto Nicoletti wrote:

Perhaps then you've hit this issue:

https://github.com/mapserver/mapserver/issues/4528

Let me know and I'll make sure to push it forward asap.

br,
Umberto


On Wed, Feb 13, 2013 at 9:03 PM, Andy Colson mailto:a...@squeakycode.net>> wrote:

I was not doing a toplevel make install, so it didnt copy
libmapserver-6.2.0.so <http://libmapserver-6.2.0.so>.

But, even after fixing my script, and installing:

usr/local/lib64/perl5/auto/__mapscript/mapscript.so
usr/lib/libmapserver.la <http://libmapserver.la>
usr/lib/libmapserver-6.2.0.so <http://libmapserver-6.2.0.so>

I get the same error.  Also:

ldd /usr/local/lib64/perl5/auto/__mapscript/mapscript.so

doesn't show it using libmapserver.

-Andy


On 2/13/2013 1:30 PM, Umberto Nicoletti wrote:

As of 6.2 mapscript is built as a shared lib and depends on
mapserver
which therefore must have been installed before.

    Umberto

    On Feb 13, 2013 8:27 PM, "Andy Colson" mailto:a...@squeakycode.net>
<mailto:a...@squeakycode.net <mailto:a...@squeakycode.net>>> wrote:

 On 2/13/2013 1:19 PM, Umberto Nicoletti wrote:

 Did you run make install in the MapServer top level
directory?

     Umberto

 On Feb 13, 2013 7:52 PM, "Andy Colson"
mailto:a...@squeakycode.net>
 <mailto:a...@squeakycode.net <mailto:a...@squeakycode.net>>
 <mailto:a...@squeakycode.net
<mailto:a...@squeakycode.net> <mailto:a...@squeakycode.net
<mailto:a...@squeakycode.net>>>__> wrote:

  Hi all,

  I'm having problems updating to 6.2.0.  I can get perl
 mapscript to
  compile and install ok, but when I try to run
anything:

  # perl dump.pl <http://dump.pl> <http://dump.pl>
<http://dump.pl>
  perl: symbol lookup error:

  /usr/local/lib64/perl5/auto/__mapscript/mapscript.so:

 undefined
  symbol: msSetup

  Any hints what might be wrong?

  Thanks for your time,

  -Andy


 I believe so.  I'm actually making a slackware package
(which I've
 done for 6.0.3 as well), and then I install the package.

 ls -l /usr/local/lib64/perl5/auto/mapscript/mapscript.so

 does show it as todays date, so I'm pretty sure its new.

 I will go try to build it by hand and verify its not the
packaging
 script that's a problem.

 -Andy







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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-13 Thread Andy Colson

Ah.  I figured it out.

I have to make and make install from top level first, so that 
libmapserver.so is found, BEFORE I go into mapscript/perl and make/make 
install.


That'll make building a package a little more difficult.  Maybe if I 
play with the path's I wont have to actually install it first.


Thanks for the help, though.  It works now.

-Andy


On 2/13/2013 2:03 PM, Andy Colson wrote:

I was not doing a toplevel make install, so it didnt copy
libmapserver-6.2.0.so.

But, even after fixing my script, and installing:

usr/local/lib64/perl5/auto/mapscript/mapscript.so
usr/lib/libmapserver.la
usr/lib/libmapserver-6.2.0.so

I get the same error.  Also:

ldd /usr/local/lib64/perl5/auto/mapscript/mapscript.so

doesn't show it using libmapserver.

-Andy

On 2/13/2013 1:30 PM, Umberto Nicoletti wrote:

As of 6.2 mapscript is built as a shared lib and depends on mapserver
which therefore must have been installed before.

Umberto

On Feb 13, 2013 8:27 PM, "Andy Colson" mailto:a...@squeakycode.net>> wrote:

On 2/13/2013 1:19 PM, Umberto Nicoletti wrote:

Did you run make install in the MapServer top level directory?

Umberto

    On Feb 13, 2013 7:52 PM, "Andy Colson" mailto:a...@squeakycode.net>
<mailto:a...@squeakycode.net <mailto:a...@squeakycode.net>>>
wrote:

 Hi all,

 I'm having problems updating to 6.2.0.  I can get perl
mapscript to
 compile and install ok, but when I try to run anything:

 # perl dump.pl <http://dump.pl> <http://dump.pl>
 perl: symbol lookup error:
 /usr/local/lib64/perl5/auto/mapscript/mapscript.so:
undefined
 symbol: msSetup

 Any hints what might be wrong?

 Thanks for your time,

 -Andy


I believe so.  I'm actually making a slackware package (which I've
done for 6.0.3 as well), and then I install the package.

ls -l /usr/local/lib64/perl5/auto/__mapscript/mapscript.so
does show it as todays date, so I'm pretty sure its new.

I will go try to build it by hand and verify its not the packaging
script that's a problem.

-Andy





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


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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-13 Thread Andy Colson
I was not doing a toplevel make install, so it didnt copy 
libmapserver-6.2.0.so.


But, even after fixing my script, and installing:

usr/local/lib64/perl5/auto/mapscript/mapscript.so
usr/lib/libmapserver.la
usr/lib/libmapserver-6.2.0.so

I get the same error.  Also:

ldd /usr/local/lib64/perl5/auto/mapscript/mapscript.so

doesn't show it using libmapserver.

-Andy

On 2/13/2013 1:30 PM, Umberto Nicoletti wrote:

As of 6.2 mapscript is built as a shared lib and depends on mapserver
which therefore must have been installed before.

Umberto

On Feb 13, 2013 8:27 PM, "Andy Colson" mailto:a...@squeakycode.net>> wrote:

On 2/13/2013 1:19 PM, Umberto Nicoletti wrote:

Did you run make install in the MapServer top level directory?

Umberto

On Feb 13, 2013 7:52 PM, "Andy Colson" mailto:a...@squeakycode.net>
<mailto:a...@squeakycode.net <mailto:a...@squeakycode.net>>> wrote:

 Hi all,

 I'm having problems updating to 6.2.0.  I can get perl
mapscript to
 compile and install ok, but when I try to run anything:

 # perl dump.pl <http://dump.pl> <http://dump.pl>
 perl: symbol lookup error:
 /usr/local/lib64/perl5/auto/mapscript/mapscript.so:
undefined
 symbol: msSetup

 Any hints what might be wrong?

 Thanks for your time,

 -Andy


I believe so.  I'm actually making a slackware package (which I've
done for 6.0.3 as well), and then I install the package.

ls -l /usr/local/lib64/perl5/auto/__mapscript/mapscript.so
does show it as todays date, so I'm pretty sure its new.

I will go try to build it by hand and verify its not the packaging
script that's a problem.

-Andy





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


Re: [mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-13 Thread Andy Colson

On 2/13/2013 1:19 PM, Umberto Nicoletti wrote:

Did you run make install in the MapServer top level directory?

Umberto

On Feb 13, 2013 7:52 PM, "Andy Colson" mailto:a...@squeakycode.net>> wrote:

Hi all,

I'm having problems updating to 6.2.0.  I can get perl mapscript to
compile and install ok, but when I try to run anything:

# perl dump.pl <http://dump.pl>
perl: symbol lookup error:
/usr/local/lib64/perl5/auto/__mapscript/mapscript.so: undefined
symbol: msSetup

Any hints what might be wrong?

Thanks for your time,

-Andy



I believe so.  I'm actually making a slackware package (which I've done 
for 6.0.3 as well), and then I install the package.


ls -l /usr/local/lib64/perl5/auto/mapscript/mapscript.so
does show it as todays date, so I'm pretty sure its new.

I will go try to build it by hand and verify its not the packaging 
script that's a problem.


-Andy



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


[mapserver-users] mapserver 6.2.0 perl mapscript

2013-02-13 Thread Andy Colson

Hi all,

I'm having problems updating to 6.2.0.  I can get perl mapscript to 
compile and install ok, but when I try to run anything:


# perl dump.pl
perl: symbol lookup error: 
/usr/local/lib64/perl5/auto/mapscript/mapscript.so: undefined symbol: 
msSetup


Any hints what might be wrong?

Thanks for your time,

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


Re: [mapserver-users] Re: Scale changes to mapserver 6.1-dev

2012-05-11 Thread Andy Colson
The MAXSIZE map option may have gotten a new default.  It used to be 
2048, but lots of people have new super wide monitors and maps wont 
render on them.  I have had to add "MAXSIZE 4096" to all my mapfiles.


To return to the default, you might try adding: "MAXSIZE 2048" to the 
top of your mapfile.


-Andy


On 5/11/2012 8:07 AM, Peter Maes wrote:

When I run the mapfile with shp2img i get proper results.

So in all likelyhood it will have to do with mode gmaps. I'll give a try
with wms in the mean while.

It seems as if for some reason i get the entire map rendered, for every
tile requested.


2012/5/11 Peter Maes mailto:thx...@gmail.com>>

Hi,

Did something change in regards to the scales? I took an existing
mapfile config (that worked fine on mapserver 6.0) and ran that now
with 6.1-DEV.

However i get repeated messages stating:
msLayerIsVisible(): Skipping layer (L1) because LAYER.MAXSCALE is
too small for this MAP scale

When I remove the layer, the layer gets drawn, however it does not
match the scale of google maps.

In fact, at a zoomed in level, i see my layer draw 6 times next to
eachother (as you would have on google zoom 0-2).

Best regards.




___
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: perl errorObj

2012-05-01 Thread Andy Colson

Done.

https://github.com/mapserver/mapserver/issues/4305

I couldn't figure out how to add labels, and I can't seem to edit it. 
Hope that's ok.


Thanks!

-Andy


On 5/1/2012 12:44 PM, Lime, Steve D (DNR) wrote:

Hi Andy: We need you to create an issue here 
https://github.com/mapserver/mapserver/issues and we can go from there...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andy Colson
Sent: Tuesday, May 01, 2012 10:47 AM
To: mapserver-users
Subject: [mapserver-users] Re: perl errorObj

On 5/1/2012 8:50 AM, Andy Colson wrote:

I have noticed a problem with the errorObj
mapserver/mapscript/swig/perl object.

Its treated as an array, the generated code to get the message looks
like this:

arg1 = (errorObj *)(argp1);
result = (char *)(char *) ((arg1)->message); { size_t size = 2048;

while (size&&  (result[size - 1] == '\0')) --size;

ST(argvi) = SWIG_FromCharPtrAndSize(result, size); argvi++ ; }

When I log errors:
my $errObj = new mapscript::errorObj(); while ($errObj) { $s .=
"ERROR: $errObj->{code}:$errObj->{message}:$errObj->{routine}";
$errObj = $errObj->next();
}

I get the message, but then huge amounts of garbage data as well.


In plmodule.i I tried to add a typemap:

%typemap(memberout) char[ANY] {
$result = newSVpvn($1, strlen($1));
argvi++;
}


But it doesn't seem to work, the generated code is exactly the same as
it was before. (I'm new to mapscript and swig, so I'm just guessing)

Any help or hints on how I might fix this?

Thanks,

-Andy



Ok, this works:

%typemap(out) char[ANY] {
$result = newSVpvn($1, strlen($1));
argvi++;
}

I was worried about it changing too much code, but after looking at the 
generated mapscript_wrap.c, it looks fine by me.  I also tested it on my test 
box and it reports errors much much better.

I'm going to put this on my live site and run it for a while.

Are there any -dev's on this list?  I'm not subscribed to mapserver-dev, I'm 
hoping I can post this here and a dev can verify its ok and add it to 
plmodule.i.

Pretty please?

-Andy
___
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: perl errorObj

2012-05-01 Thread Andy Colson

On 5/1/2012 8:50 AM, Andy Colson wrote:

I have noticed a problem with the errorObj mapserver/mapscript/swig/perl
object.

Its treated as an array, the generated code to get the message looks
like this:

arg1 = (errorObj *)(argp1);
result = (char *)(char *) ((arg1)->message);
{
size_t size = 2048;

while (size && (result[size - 1] == '\0')) --size;

ST(argvi) = SWIG_FromCharPtrAndSize(result, size); argvi++ ;
}

When I log errors:
my $errObj = new mapscript::errorObj();
while ($errObj)
{
$s .= "ERROR: $errObj->{code}:$errObj->{message}:$errObj->{routine}";
$errObj = $errObj->next();
}

I get the message, but then huge amounts of garbage data as well.


In plmodule.i I tried to add a typemap:

%typemap(memberout) char[ANY] {
$result = newSVpvn($1, strlen($1));
argvi++;
}


But it doesn't seem to work, the generated code is exactly the same as
it was before. (I'm new to mapscript and swig, so I'm just guessing)

Any help or hints on how I might fix this?

Thanks,

-Andy



Ok, this works:

%typemap(out) char[ANY] {
$result = newSVpvn($1, strlen($1));
argvi++;
}

I was worried about it changing too much code, but after looking at the 
generated mapscript_wrap.c, it looks fine by me.  I also tested it on my 
test box and it reports errors much much better.


I'm going to put this on my live site and run it for a while.

Are there any -dev's on this list?  I'm not subscribed to mapserver-dev, 
I'm hoping I can post this here and a dev can verify its ok and add it 
to plmodule.i.


Pretty please?

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


[mapserver-users] perl errorObj

2012-05-01 Thread Andy Colson
I have noticed a problem with the errorObj mapserver/mapscript/swig/perl 
object.


Its treated as an array, the generated code to get the message looks 
like this:


arg1 = (errorObj *)(argp1);
result = (char *)(char *) ((arg1)->message);
{
  size_t size = 2048;

  while (size && (result[size - 1] == '\0')) --size;

  ST(argvi) = SWIG_FromCharPtrAndSize(result, size); argvi++ ;
}

When I log errors:
my $errObj = new mapscript::errorObj();
while ($errObj)
{
   $s .= "ERROR: 
$errObj->{code}:$errObj->{message}:$errObj->{routine}";

   $errObj = $errObj->next();
}

I get the message, but then huge amounts of garbage data as well.


In plmodule.i I tried to add a typemap:

%typemap(memberout) char[ANY] {
$result = newSVpvn($1, strlen($1));
argvi++;
}


But it doesn't seem to work, the generated code is exactly the same as 
it was before.  (I'm new to mapscript and swig, so I'm just guessing)


Any help or hints on how I might fix this?

Thanks,

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


Re: [mapserver-users] Efficiency - Postgres/gis view or Mapserver data definition join

2011-04-28 Thread Andy Colson

On 4/28/2011 1:34 PM, Dara Olson wrote:

Greetings. I am hoping that I have posted this on the most appropriate
list, please let me know if I should be posting to a different list.
In our Mapserver application, we join a lot of tables together -
generally one table with geometry to a "flat" table with tabular data.
My question is - is it more efficient/faster to create a view in
PostgreSQL doing the join and link to the view table from Mapserver or
to define the join (SQL statement) with Mapserver in the data definition
within the layer definition? Does it even matter because Mapserver sends
the request to PostgreSQL/GIS?
Also, we have joins that take a field within the flat table to determine
which table to join to get geometry. For example, if the flat table
column "join" value is equal to 1 then it joins to "table1" to get
geometry or if column "join" value is equal to 2 then it joins to
"table2" to get geometry. I read something that you were not supposed to
use WHERE clauses in the Mapserver data definition. Would this be better
to do as a view and link to the view table from the data definition?
Any advice would be greatly appreciated. Thanks in advance!
Dara



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


> is it more efficient/faster to create a view in
> PostgreSQL doing the join and link to the view table from Mapserver or
> to define the join (SQL statement) with Mapserver in the data definition
> within the layer definition?

I doubt a view would be faster or slower.  I'd bet it would be the same. 
 (Engine wise its going to process the same sql statement, collect/join 
the data the same way, etc).


> I read something that you were not supposed to
> use WHERE clauses in the Mapserver data definition.

Where?  I disagree with that totally.


> Would this be better
> to do as a view and link to the view table from the data definition?

1) performance wise, no, I doubt it because:

create view test1 as select * from fname where id < 5;

Then:

"select * from test1" and "select * from fname where id < 5"

are processed exactly the same way... and it would even be the same as:

create view test2 as select * from fname;

select * from test2 where id < 5;

performance wise, the backend processes them all the same way.

2) usage wise, no because the view limit's your usage of the where.  You 
cannot pass or change arguments:


create view test1 as select * from fname where id < 5;

There is no way to change the "id < 5" condition.  You can't pass it as 
an argument to the view, and you can't modify it without recreating the 
view.



I'd say its okay to stay with sql in your mapfile.  The only time I have 
used views is when I need to query different tables with different 
names/columns in a clean consistent way.  I sometimes get data that has 
a column parcel_number, or PID, or parcelNum or ...  I create a view for 
each database, then my view can use the actual name, but my mapfile 
always looks the same:


select pin, the_geom from parcels;

Another good use for view's is if you want to hide some of the 
complexity of all the joins.  It might make your mapfile look a little 
nicer and easier to edit.  But dont put the where's inside the view... 
because then everyone is stuck with it. You mapfile should look like:


select ...,the_geom from view where something = x;

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


Re: [mapserver-users] Production mapserver

2011-03-21 Thread Andy Colson

On 3/21/2011 12:33 PM, thomas bonfort wrote:

On Mon, Mar 21, 2011 at 18:28, Andy Colson  wrote:



Cant answer anything about Ubuntu, never used it, run Slackware myself.  I
prefer to build mapserver from source.  I'm also using mapscript (with
perl), so I build that as well.

compiling stuff from source also leaves out all the parts of mapserver
that can cause some marginal overhead. for example, if you are only
serving shapefiles, you can leave out the gdal/ogr and postgis
dependencies



Indeed.  When I first started playing with mapserver, I went totally OCD 
trying to compile in every possible format it would support.  Was really 
kinda fun.  (Dont know what hdf5 is, never seen it, never needed it, 
cant say as I ever will... but I have support for it! Yeah!)


Its amazing how many formats that mapserver/gdal/ogr support.  (Dude! 
Its like Pokemon!  Gotta get 'em all!)


Huh.. I'm gonna need to lay off the crack again. :-)

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


Re: [mapserver-users] Production mapserver

2011-03-21 Thread Andy Colson

On 3/21/2011 11:27 AM, Jeff Dege wrote:

What do we need to do to get Mapserver running in a production
configuration?


I guess that's up to you.  Do you need 100% uptime?  Mirrors and backups 
and redundancy?  You'll also need an ISP that lets you host data.  Many 
residential plans forbid it.  You'll need a commercial plan.  Or are you 
renting a VSP, or something?  Your question is a little vague.  Do you 
mean internet connections?  Hardware?  Just mapserver?





There are packages out there to help new users get mapserver up and
running in a development/playing-around-in mode, ms4w, etc. But these
are designed for ease of installation, not performance on a production
server.


Do you know the level of performance you'll need?  How many concurrent 
users?  Have you put a load on it?  Since you said the word 
"performance", I'd say go for FastCGI.  If you need more performance 
than that, well, that's another ballgame.




I have a set of shapefiles, and some mapfiles I’ve built to display
them. I have them running on a dev machine, just fine.

So what do I need to do to go into production.


I have a test box, and a live box... and I try to keep them as exact as 
possible.  That way when you make changes, and do load tests, and what 
not, you know what to expect from the live site.  Need to test 
something?  The more identical your live and test boxes are, the more 
sure you can be about your testing.


(Note, however, my live box is running off raid 5, where as my test is 
just a single HD.  CPU's are close.  Software wise, they are the same 
though)




I have a dedicated Ubuntu 10.04 box, that will be doing nothing but
serving maps through WMS requests, using Mapserver. It currently has
both Apache and MapServer installed, using the current apt-get packages.

Should I be using Apache? Or should I use Lighttpd?


Use the one you are most comfortable with.  Speed wise it wont matter. 
You'll be spending all your time in mapserver code, not apache/lighty 
code.  (unless, of course, you have huge amounts of static files along 
with the maps... but those should all be marked as cacheable, so still, 
not gonna make a performance difference)


Cant answer anything about Ubuntu, never used it, run Slackware myself. 
 I prefer to build mapserver from source.  I'm also using mapscript 
(with perl), so I build that as well.




Standard CGI? FastCGI? Some other alternative? (WSGI?)



CGI is slow.  FastCGI if you want performance.  Never used WSGI.

As background:  I run on a dual core amd64 3800, 4 green HD's in 
software raid 5, 6 gig of ram, running Slackware64.  I think the box 
cost me around $400 to build.  I get 100K hits a day (about 2 requests a 
second), and the box sits 75% idle.


I have about 350 gig of arial imagery, and 25 gig of shapefiles in PostGIS.

It's run on apache/mapscript/mod_perl.

-Andy

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


Re: [mapserver-users] Problems getting started with POSTGIS

2011-03-18 Thread Andy Colson

On 3/18/2011 11:52 AM, Jeff Dege wrote:

I’ve been using MapServer with shapefiles for some time. I’m trying to
convert a site to PostGIS, and I’m having problems.

I’ve successfully installed PostGIS on my Ubunto 10.04 box, and copied a
number of shapefiles into it, using shp2pgsql. I can view the new tables
using qGIS, so I’m sure the data is right.

So now I’ve copies a mapfile that was working against the original
shapefiles, and I’m trying to convert it to use PostGIS. I’m working on
just one layer, and I’m trying to test that layer with shp2img.

I’ve added to the LAYER definition:

LAYER

NAME “countyboundaries”

CONNECTIONTYPE postgis

CONNECTION “host=localhost dbname=test_db user=gis password=x”

DATA “the_geom from gis_schema.county”

[…]

END

As I said, I know the data is in the database, because I can load it as
a PostGIS layer from qGIS. Column and table names are right, because
when I run “select the_geom from gis_schema.county” in the query tool I
get the data.

But when I run shp2img from the commandline, I get an error:

$ shp2img -m test.map -o test.gif -i GIF -l countyboundaries

msDrawMap(): Image handling error. Failed to draw layer named
‘countyboundaries’.

msPostGISParseData(): Query error. Error parsing PostGIS DATA variable.
Must contain ‘geometry

from table’ or ‘geometry from (subselect) as foo’. County

shp2img is MapServer version 5.6.6, and the output from -v does contain
“INPUT=POSTGIS”.

Any ideas? I’m trying to keep things simple, and it’s frustrating when
simple doesn’t work.


I cant see anything really wrong.  I'm doing mostly the same thing.

however:

> CONNECTION “dbname=test_db user=gis password=x”

because mapserver and PG run on the same box, I left off the 
host=localhost... not sure if its important.


> DATA "the_geom from gis_schema.county using unique gid using srid=-1"

I also have the unique and srid things, again not sure if there'd be a 
difference.



And as a last hint, you can try bumping up the debug:

MAP
CONFIG "MS_ERRORFILE" "/tmp/mapserver.log"
...
LAYER
DEBUG 4
...
END

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


Re: [mapserver-users] MapServer 6 beta, opengl, linux

2011-03-11 Thread Andy Colson

On 03/11/2011 05:20 AM, thomas bonfort wrote:

Andy,
yes a (beefy) video card is needed or at least wanted, as you want to
offset the calculations to the GPU. If one isn't present, you're going
to fall back to a software opengl implementation which will be orders
of magnitude slower than what AGG is going to take.

cc-ing Toby if he wants to comment further on this.

regards,
thomas

On Fri, Mar 11, 2011 at 03:02, Andy Colson  wrote:

On 03/10/2011 07:16 PM, Andy Colson wrote:


On 03/09/2011 08:47 PM, Daniel Morissette wrote:


The MapServer Team is pleased to announce the release of MapServer
6.0.0-beta1. This is the first beta on our way to a final 6.0 release.



I cannot seem to get opengl to work.

a stacktrace of shp2img:

Program received signal SIGSEGV, Segmentation fault.
0x7690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
(gdb) backtrace
#0 0x7690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
#1 0x0047667f in OglRenderer::OglRenderer(unsigned int, unsigned
int, colorObj*) ()
#2 0x00474988 in msImageCreateOgl(int, int, outputFormatObj*,
colorObj*) ()
#3 0x0044cd26 in msPrepareImage ()
#4 0x0044ce75 in msDrawMap ()
#5 0x00415067 in main ()
(gdb)



I'll continue my comments from another thread in this better named thread.

So... I'm confused with mapoglrenderer.cpp.

I dont see where any GLX context or PBuffer have been setup yet before the 
first call to OglRenderer::OglRenderer.  The first thing it does is: 
glGetIntegerv(GL_VIEWPORT ,viewPort);

But how can there be a viewport size yet?  I added a debug message right after 
it:
if(msGetGlobalDebugLevel() >= MS_DEBUGLEVEL_DEBUG)
{   
msDebug("viewport %d, %d, %d, %d\n", viewportX, viewportY, 
viewportWidth, viewportHeight);
}

and got:

$ ./shp2img -all_debug 15 -m /pub/maps/test.map -o x.png
[Fri Mar 11 19:30:01 2011].731230 msLoadMap(): 0.000s
[Fri Mar 11 19:30:01 2011].731352 viewport 48, 135483496, 134889737, 0

that cant be right... can it?

The next thing is getTextureSize, which calls glTexImage2D.  Will that work 
with no context?

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 03/10/2011 07:16 PM, Andy Colson wrote:

On 03/09/2011 08:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer 6.0.0-beta1. 
This is the first beta on our way to a final 6.0 release.



I cannot seem to get opengl to work.

a stacktrace of shp2img:

Program received signal SIGSEGV, Segmentation fault.
0x7690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
(gdb) backtrace
#0 0x7690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
#1 0x0047667f in OglRenderer::OglRenderer(unsigned int, unsigned int, 
colorObj*) ()
#2 0x00474988 in msImageCreateOgl(int, int, outputFormatObj*, 
colorObj*) ()
#3 0x0044cd26 in msPrepareImage ()
#4 0x0044ce75 in msDrawMap ()
#5 0x00415067 in main ()
(gdb)



MapServer version 6.0.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=OPENGL SUPPORTS=FREETYPE SUPPORTS=ICONV 
SUPPORTS=WMS_SERVER SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

I dont need special video card and/or drivers, do I? And I'm not running X. 
Dont need to, do I?

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


To reply to myself, after some googling, it looks like yes, X is needed.

Which kinda sucks.  This is a webserver, it runs apache and postgresql.  In a 
rack someplace.  Doesn't even have a monitor attached.  If I ever need to do 
something I ssh in.

Its also has a crappy video card.  Cuz its a server.  Never thought I'd need 
good video.

So here is my delima: do I buy a $80 video card, and run X, so I can get 
hardware accelerated maps?  Is it worth it?  Is it that much faster?

How many concurrent maps can be drawn at once?  If 10 people hit my website can 
all 10 images be rendered at once?  Or will one run and the others error out?  
Is there an upper limit for the number of concurrent renderings?

Any benchmarks?

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 03/09/2011 08:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer 6.0.0-beta1. 
This is the first beta on our way to a final 6.0 release.



I cannot seem to get opengl to work.

a stacktrace of shp2img:

Program received signal SIGSEGV, Segmentation fault.
0x7690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
(gdb) backtrace
#0  0x7690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
#1  0x0047667f in OglRenderer::OglRenderer(unsigned int, unsigned int, 
colorObj*) ()
#2  0x00474988 in msImageCreateOgl(int, int, outputFormatObj*, 
colorObj*) ()
#3  0x0044cd26 in msPrepareImage ()
#4  0x0044ce75 in msDrawMap ()
#5  0x00415067 in main ()
(gdb)



MapServer version 6.0.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=OPENGL SUPPORTS=FREETYPE SUPPORTS=ICONV 
SUPPORTS=WMS_SERVER SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

I dont need special video card and/or drivers, do I?  And I'm not running X.  
Dont need to, do I?

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/10/2011 4:39 PM, Andy Colson wrote:

On 10/03/2011 3:54 PM, Stephen Woodbridge wrote:

A couple of points on this, MS6.0 no longer has a GD driver? is this
correct? if so, then:
a. need to add to migration guide
b. need to indicate appropriate GD to AGG OUTPUTFORMAT conversions
c. mapfile parsing should throw an error ob DRIVER 'GD/...'

-Steve W



On 3/10/2011 3:32 PM, Yewondwossen Assefa wrote:
 > GD is still there . It is still there and does 8bit png and gif.
 >


Well, then I think somethings wrong. I cannot get GD to work at all, and
I cannot get it to use anything else:

andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.jpg -i jpeg
loadOutputFormat(): General error message. OUTPUTFORMAT clause
references driver GD/JPEG, but this driver isn't configured. 

andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.png -i jpg
loadOutputFormat(): General error message. OUTPUTFORMAT clause
references driver GD/JPEG, but this driver isn't configured. 

-- yes, bob2 is defined as an outputform in my .map file as AGG/PNG

andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.png -i bob2
loadOutputFormat(): General error message. OUTPUTFORMAT clause
references driver GD/JPEG, but this driver isn't configured. 

andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.png -i png
loadOutputFormat(): General error message. OUTPUTFORMAT clause
references driver GD/JPEG, but this driver isn't configured. 

Does not seem to matter what I have in the .map file... nothing works.

And I did compile GD in, why why wont it use it?

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


BA!  I was editing blueearthmn2.map but shp2img'ing blueearthmn.map

but still, I cannot get GD to work at all.  And it seems like the 
outputFormats are colliding.  If I define:


OUTPUTFORMAT
NAME "bob2"
DRIVER 'AGG/PNG'
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END

I can use bob2, but if I name it agg or aggpng24 (or whatever) it has 
problems.  (same with jpeg and jpg, cant seem to use em)  If I use 
anything "standard" I get an empty image back.  Meaning zero byte file. 
 (from perl mapscript).  Using bob2 I can get an image back, and it 
looks nice.


-Andy

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andy Colson
Sent: Thursday, March 10, 2011 11:39 AM
To: Daniel Morissette
Cc: mapserver-users
Subject: Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

On 3/9/2011 8:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer
6.0.0-beta1. This is the first beta on our way to a final 6.0 release.



My mapfile has:

LABEL
TYPE truetype
FONT "Vera"
SIZE 10
COLOR 255 255 255
OUTLINECOLOR 0 61 245
BUFFER 3
ANGLE [txt_angle]
POSITION cc
PARTIALS false
END

I get error:

ERROR: 4:Parsing error near (txt_angle):(line 164):getSymbol()

(the line number is correct... that's very nice)

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




On 3/10/2011 3:18 PM, Lime, Steve D (DNR) wrote:
> Hmm... Is the mapfile being loaded through MapScript or CGI/sh2img? 
Will have a look.

>
> THANKS FOR TESTING!!!
>
> Steve
>

Both fail.  Here is the map file.  It uses postGis, hopefully it'll die 
parsing before you actually need to hit the db.



-Andy
# at zero (at + sign)
# 400 at 1
# 900 at 3   **start
# 3000 at 4
# 6000 at 5
# 11000 at 6
# 22000 at 7
# 44000 at 8
# 87000 at 9
MAP
#CONFIG "MS_ERRORFILE" "/tmp/blue.tmp"

NAME blueearth
SIZE 800 800
UNITS feet
SHAPEPATH '/pub/maps/BlueearthMN/shape'
FONTSET "/pub/www/fonts/fonts.txt"

#EXTENT 507346.988736 100294.437868 628854.325083 241675.238498
EXTENT 471625 98939 636718 252080

PROJECTION
"+proj=lcc +lat_1=45.216667 +lat_2=43.78 
+lat_0=43 +lon_0=-94 +x_0=80 +y_0=10 +ellps=GRS80 +units=m +no_defs"
END

IMAGECOLOR 192 192 192

QUERYMAP
STATUS ON
STYLE HILITE
END


LEGEND
IMAGECOLOR 255 255 255
STATUS ON
#KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
END

WEB
IMAGEPATH '/tmp/'
IMAGEURL '/tmp/'
METADATA
'wms_title'   'blueearthmn'
'wms_onlineresource'  
'http://mapper/getmap.pl?map=blueearthmn&;'
'wms_srs' 'EPSG:2812'
"wms_feature_info_mime_type"  "text/plain"
"wms_enable_request"   "*"
END
END

SYMBOL
NAME 'dashed1'
TYPE ELLIPSE
POINTS 1 1 END
FILLED true
PATTERN 5 5 5 5 END
END

SYMBOL
NAME 'CIRCLE'
TYPE ellipse
FILLED true
POINTS
1 1
END
END

SYMBOL
NAME "railway"
TYPE truetype
FONT "Vera"
CHARACTER "|"
GAP -25 # distance between symbols
END

LAYER
#DEBUG 4
NAME "raster12"
STATUS off
TILEINDEX "raster12.shp"
TILEITEM "location"
TYPE RASTER
END

LAYER
#DEBUG 4
NAME "raster6"
STATUS off
TILEINDEX "raster6.shp"
TILEITEM "location"
TYPE RASTER
END

LAYER
NAME 'search'
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION "dbname=gis user=andy"
DATA 'the_geom from (select parcelPoly.gid, general.gid as 
genid, the_geom from blueearthmn.parcelPoly inner join blueearthmn.general on 
general.parcelpin=parcelPoly.pin) as subq using unique gid using srid=-1'
STATUS off
# getmap.pl will fixup this filter, by default show nothing
FILTER '1=2'

METADATA
'wms_title' 'search'
END

CLASS
STYLE
SYMBOL  'circle'
COLOR25

Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 10/03/2011 3:54 PM, Stephen Woodbridge wrote:

A couple of points on this, MS6.0 no longer has a GD driver? is this
correct? if so, then:
a. need to add to migration guide
b. need to indicate appropriate GD to AGG OUTPUTFORMAT conversions
c. mapfile parsing should throw an error ob DRIVER 'GD/...'

-Steve W



On 3/10/2011 3:32 PM, Yewondwossen Assefa wrote:
> GD is still there . It is still there and does 8bit png and gif.
>


Well, then I think somethings wrong.  I cannot get GD to work at all, 
and I cannot get it to use anything else:


andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.jpg -i jpeg
loadOutputFormat(): General error message. OUTPUTFORMAT clause 
references driver GD/JPEG, but this driver isn't configured. 


andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.png -i jpg
loadOutputFormat(): General error message. OUTPUTFORMAT clause 
references driver GD/JPEG, but this driver isn't configured. 


-- yes, bob2 is defined as an outputform in my .map file as AGG/PNG

andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.png -i bob2
loadOutputFormat(): General error message. OUTPUTFORMAT clause 
references driver GD/JPEG, but this driver isn't configured. 


andy@mapper:/pub/maps$ shp2img -m blueearthmn.map -o tmp.png -i png
loadOutputFormat(): General error message. OUTPUTFORMAT clause 
references driver GD/JPEG, but this driver isn't configured. 


Does not seem to matter what I have in the .map file... nothing works.

And I did compile GD in, why why wont it use it?

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/10/2011 1:59 PM, Yewondwossen Assefa wrote:

nipped>


msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in
the LAYERS parameter.

The layer is set and is valid, its the same request I make to the
prior version of mapscript and it works fine.

I did have to modify my map file just a bit (commented out the ANGLE
and label backgroundcolor), but all the layers are still there.


This could be related to that fact that you should enable ows request
(http://mapserver.org/development/rfc/ms-rfc-67.html)

"ows_enable_request" "*"


best regards,




-Andy

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






Ga!  Yep.  Sort of.  My SERVICE is set to WMS not OWS so I completely 
skipped over it, but I see, reading further there is also 
wms_enable_request.


I enabled both (and either one individually to test) and now I dont get 
an error, but I also dont get an image back.  Might be some other 
mapfile change.  I'll go threw it again.


Thanks (and you too Tamas)

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/10/2011 1:03 PM, Andy Colson wrote:

On 3/9/2011 8:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer
6.0.0-beta1. This is the first beta on our way to a final 6.0 release.



I cannot get perl mapscript to work.

my code:

$x = $map->OWSDispatch( $owreq );
if ($x)
{
print STDERR "ERROR: OWSDispatch: $x\n";
my $errObj = new mapscript::errorObj();
while ($errObj) {
print STDERR "ERROR:
$errObj->{code}:$errObj->{message}:$errObj->{routine} \n";
$errObj = $errObj->next();
}
}

my $content_type = mapscript::msIO_stripStdoutBufferContentType();
$x = mapscript::msIO_getStdoutBufferBytes();

This is a test script, and the first problem is I'm not passing any
arguments to OWSDispatch. Prior versions errored out and reported:

ERROR: OWSDispatch: 1
ERROR: 12:OWS Common exception: exceptionCode=MissingParameterValue,
locator=SERVICE, ExceptionText=SERVICE parameter missing.:msOWSDispatch()


Ver 6 however reports:

ERROR: OWSDispatch: 2
ERROR: 0::

Looks like OWSDispatch returned a 2, but the mapscript::errorObj stuff
did not get set.

(when I do pass arguments to OWSDispatch I still get an error but with
no errorObj descriptions I have no idea whats wrong)

Oh, and shp2img works ok.

-Andy

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


Oh, if I set EXCEPTIONS to vnd.ogc.se_xml, I do get a message:



msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the 
LAYERS parameter.


The layer is set and is valid, its the same request I make to the prior 
version of mapscript and it works fine.


I did have to modify my map file just a bit (commented out the ANGLE and 
label backgroundcolor), but all the layers are still there.


-Andy

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/9/2011 8:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer
6.0.0-beta1. This is the first beta on our way to a final 6.0 release.



I cannot get perl mapscript to work.

my code:

$x = $map->OWSDispatch( $owreq );
if ($x)
{
print STDERR "ERROR: OWSDispatch: $x\n";
my $errObj = new mapscript::errorObj();
while ($errObj) {
		print STDERR "ERROR: 
$errObj->{code}:$errObj->{message}:$errObj->{routine} \n";

$errObj = $errObj->next();
}
}

my $content_type = mapscript::msIO_stripStdoutBufferContentType();
$x = mapscript::msIO_getStdoutBufferBytes();

This is a test script, and the first problem is I'm not passing any 
arguments to OWSDispatch.  Prior versions errored out and reported:


ERROR: OWSDispatch: 1
ERROR: 12:OWS Common exception: exceptionCode=MissingParameterValue, 
locator=SERVICE, ExceptionText=SERVICE parameter missing.:msOWSDispatch()



Ver 6 however reports:

ERROR: OWSDispatch: 2
ERROR: 0::

Looks like OWSDispatch returned a 2, but the mapscript::errorObj stuff 
did not get set.


(when I do pass arguments to OWSDispatch I still get an error but with 
no errorObj descriptions I have no idea whats wrong)


Oh, and shp2img works ok.

-Andy

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/9/2011 8:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer
6.0.0-beta1. This is the first beta on our way to a final 6.0 release.



My mapfile has:

LABEL
TYPE truetype
FONT "Vera"
SIZE 10
COLOR 255 255 255
OUTLINECOLOR 0 61 245
BUFFER 3
ANGLE [txt_angle]
POSITION cc
PARTIALS false
END

I get error:

ERROR: 4:Parsing error near (txt_angle):(line 164):getSymbol()

(the line number is correct... that's very nice)

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/9/2011 8:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer
6.0.0-beta1. This is the first beta on our way to a final 6.0 release.



My mapfile has:

IMAGECOLOR 192 192 192
IMAGEQUALITY 95
IMAGETYPE jpeg
OUTPUTFORMAT
NAME jpeg
DRIVER 'GD/JPEG'
MIMETYPE 'image/jpeg'
EXTENSION 'jpeg'
END

Error I get:
ERROR: 12:OUTPUTFORMAT clause references driver GD/JPEG, but this driver 
isn't configured.:loadOutputFormat()



 mapserv -v
MapServer version 6.0.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=OPENGL 
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=GEOS 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE



Sure enough, no GD... but I did compile it in:

configure: checking for GD 2.0.28 or higher...
checking for gdImageCreatePaletteFromTrueColor in -lgd... yes
using libgd 2.0.28 (or higher) from system libs (-L/usr/lib64 
-lgd -ljpeg -lfreetype -lz -lpng -lz -lXpm -lX11 ).

checking for gdImageCreate in -lgd... yes
checking for gdImageGif in -lgd... yes
checking for gdImagePng in -lgd... yes
checking for gdImageJpeg in -lgd... yes
checking for gdImageWBMP in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImageOpenPolygon in -lgd... yes
checking for gdImageGifPtr in -lgd... yes
checking for gdFontGetTiny in -lgd... yes
checking for gdImageSetResolution in -l... no
checking whether gdImageGetTrueColorPixel is declared... yes
checking for gdImageGetTrueColorPixel in -lgd... yes
using GD ( -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG 
-DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR 
-DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL) from system libs.


So what do I use?

I'd also like to try the new opengl stuff.. is there new docs for:

http://mapserver.org/mapfile/outputformat.html

-Andy

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/10/2011 10:17 AM, Daniel Morissette wrote:

On 11-03-10 10:08 AM, Andy Colson wrote:


Having a problem compiling opengl support. Without opengl it compiles
fine. Looks like its looking in /usr/lib, not /usr/lib64.



I have created ticket http://trac.osgeo.org/mapserver/ticket/3724 for
this and committed a change that should fix it. However I am not setup
to test on that platform, so please test and reopen the ticket if that
didn't fix the issue.



It works.  configure went ok, and make built ok.  Still need to install 
and use it.


Thanks!

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


Re: [mapserver-users] MapServer 6.0.0-beta1 release - Please test!

2011-03-10 Thread Andy Colson

On 3/9/2011 8:47 PM, Daniel Morissette wrote:

The MapServer Team is pleased to announce the release of MapServer
6.0.0-beta1. This is the first beta on our way to a final 6.0 release.




Having a problem compiling opengl support.  Without opengl it compiles 
fine.  Looks like its looking in /usr/lib, not /usr/lib64.


Slackware64 13.1.

./configure --with-ogr --with-gdal --with-agg --with-geos --with-postgis 
  --with-xml2 --with-free-type --with-proj --with-tiff --with-jpeg 
--with-curl --with-gd --with-postgis=/usr/local/pgsql/bin/pg_config 
--with-opengl --with-ftgl



...lots of output...

checking for gdImageCreatePaletteFromTrueColor in -lgd... yes
using libgd 2.0.28 (or higher) from system libs (-L/usr/lib64 
-lgd -ljpeg -lfreetype -lz -lpng -lz -lXpm -lX11 ).

checking for gdImageCreate in -lgd... yes
checking for gdImageGif in -lgd... yes
checking for gdImagePng in -lgd... yes
checking for gdImageJpeg in -lgd... yes
checking for gdImageWBMP in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImageOpenPolygon in -lgd... yes
checking for gdImageGifPtr in -lgd... yes
checking for gdFontGetTiny in -lgd... yes
checking for gdImageSetResolution in -l... no
checking whether gdImageGetTrueColorPixel is declared... yes
checking for gdImageGetTrueColorPixel in -lgd... yes
using GD ( -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG 
-DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR 
-DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL) from system libs.

checking if FTGL support requested... looking for ftgl libs in /usr
using ftgl from /usr
checking if OGL support requested... looking for opengl libs in /usr
./configure: line 9891: -L/usr/lib64: No such file or directory
configure: error: "could not find libGL or libGLU in /usr/lib/."




config.log:

configure:9774: checking if FTGL support requested
configure:9785: result: looking for ftgl libs in /usr
configure:9849: result: using ftgl from /usr
configure:9873: checking if OGL support requested
configure:9885: result: looking for opengl libs in /usr
configure:9917: error: "could not find libGL or libGLU in /usr/lib/."

## - ##
## Output variables. ##
## - ##
ALL_ENABLED='-DUSE_FTGL   -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG 
-DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR 
-DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV 
-DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE '

ALL_INC='-I/usr/include/FTGL/ -I/usr/include   -I/usr/include/freetype2 '
ALL_LIB='-L/usr/lib64 -lftgl -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype 
-lz -lpng -lz -lXpm -lX11  -lc -lz -lfreetype -lz '


FTGL_ENABLED='-DUSE_FTGL '
FTGL_INC='-I/usr/include/FTGL/'
FTGL_LIB='-L/usr/lib64 -lftgl'



-Andy

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


Re: [mapserver-users] get the closest feature in a point query

2010-12-09 Thread Andy Colson

On 12/9/2010 11:07 AM, Mark Volz wrote:

Hello,

I know we can use tolerance/ toleranceusnitsto control the sensitivity
forspatial queries. Is there a way tofurthercontrol queries by getting
the nearest feature, or the first feature found?

Thanks

Mark Volz

GIS Specialist

Lyon County, MN



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


Not sure if this'll help, but I use PostGIS for that, here is the query 
I use to find the nearest road from a click point:



select roads, distance(the_geom, GeomFromText(point, -1)) as distance
from cadastralLine, ST_Buffer(GeomFromText(point, -1), 100) as g
where the_geom && g and roads is not null
order by distance
limit 1

point here is a text variable, like: POINT(1 100)

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


Re: [mapserver-users] Auto- classify by attribute value

2010-11-18 Thread Andy Colson

On 11/18/2010 10:10 AM, Simone Frigerio wrote:

Hi,
I have a vector shp with almost 8000 records.
Example of table:
Column1 - Column2 - Column3 - Combi -
0 0 0 0_0_0
1 0 0 1_0_1
0 0 1 0_1_0


There are 260 combination in attribute value Combi. If I fix a CLASS for
one like:
...
CLASS
EXPRESSION "0_0_0"
STYLE
COLOR 25 255 255
OUTLINECOLOR 0 0 0
END
END


can I generate an automatic classification for all the 259 other classes?
Thanks.

Simone
--



Yes.  With a little perl.  I do the same thing with my land survey layers.

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


Re: [mapserver-users] mapserver stopped working - help needed

2010-11-10 Thread Andy Colson

On 11/10/2010 12:14 PM, nelson guda wrote:

Hello all,

Several years ago I built a mapping site called Roadlessland.org
, which uses mapserver and google maps to map
national forest roadless areas. I taught myself a lot of programming and
built the site from the ground up.

Suddenly this fall mapserver stopped functioning completely. All I get
is the error below. The address for the mapserver
http://thewildwoodstudios.com/cgi-bin/mapserv?

Until now there have been few maintenance issues, and I have no idea
what might have happened. As far as I know there haven't been any
changes in the server. Does anybody have any idea what might have gone
wrong?

Thank you,
Nelson Guda



Can you check the Apache error log?  More info about the problem should 
be in there,


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


Re: [mapserver-users] formatting query and identify results

2010-09-03 Thread Andy Colson

On 9/3/2010 8:12 AM, Mark Volz wrote:

Hello,

I have an application that I am working on. The parcel id is in a
xx.xxx.xxx.x format, however I need to change the format to xx-xxx-xxx-x
for an external tax database application. I will not be updating the
data, and therefore I will need to make this change through code. I have
worked on previous applications using java. For example I would use
parcel = ( this.substring(0,2) + "-" + this.substring(3,9). However,
unless I am wrong, mapserver does not appear to pass javascript through
templates.

Is there a way that I can convert the format of numbers directly in the
template?

Thanks

Mark Volz

GIS Specialist


Not sure if this is relevant, but I have kinda the same problem, some of
my data has parcel masking and some does not.  I usually add a new
column (I'm use PostGIS, not shapefiles, but I assume you could still do
it) and set it with the masking I'd like to display.  So I have a pin
field and a display_pin field, and can query/join on one and display the
other.

I know you said you would not update the data, but if I carefully read
that as not "modify the existing pin", then adding a new column would
not count as "modify the existing pin".

-Andy



On 9/3/2010 9:08 AM, Mark Volz wrote:
> Andy,
>
> Thank you for your reply.
>
> I could add a new column to the data to create a new mask so that the
> application will work.  However, once I am complete with the 
development of
> the application, I will no longer be in control of the data.  Since 
the data
> source has the wrong mask, any data updates from my client will not 
include

> the correct mask.
>
>
> Mark Volz
> GIS Specialist


Ah, bummer.

Where in the process are we talking?  The beginning?  They open a web 
browser with url http://.../map=a.map&pin=badmask?


Or you are generating the map, know the pin, but need to display the bad 
mask instead of the good?


Humm... still using geoMoose?  So the backend is cgi w/shapefiles?

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


Re: [mapserver-users] formatting query and identify results

2010-09-03 Thread Andy Colson

On 9/3/2010 8:12 AM, Mark Volz wrote:

Hello,

I have an application that I am working on. The parcel id is in a
xx.xxx.xxx.x format, however I need to change the format to xx-xxx-xxx-x
for an external tax database application. I will not be updating the
data, and therefore I will need to make this change through code. I have
worked on previous applications using java. For example I would use
parcel = ( this.substring(0,2) + “-“ + this.substring(3,9). However,
unless I am wrong, mapserver does not appear to pass javascript through
templates.

Is there a way that I can convert the format of numbers directly in the
template?

Thanks

Mark Volz

GIS Specialist


Not sure if this is relevant, but I have kinda the same problem, some of 
my data has parcel masking and some does not.  I usually add a new 
column (I'm use PostGIS, not shapefiles, but I assume you could still do 
it) and set it with the masking I'd like to display.  So I have a pin 
field and a display_pin field, and can query/join on one and display the 
other.


I know you said you would not update the data, but if I carefully read 
that as not "modify the existing pin", then adding a new column would 
not count as "modify the existing pin".


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


Re: [mapserver-users] WMS Orthophoto performance

2010-08-02 Thread Andy Colson

2010/8/2 Andy Colson mailto:a...@squeakycode.net>>

On 8/2/2010 5:06 AM, Cédric MOULLET wrote:

Hello,
We've got a 150 GB ECW dataset (aerial imagery) and the LAYER
configuration uses a TILEINDEX.
We can observe a WMS request time of about 3 seconds (on a
server with
this configuration: 7.5 GB RAM, 4 core, 64 bits / MapServer 5.4.3).
I'd like to know if 3 seconds is considered as a normal response
time
for this kind of WMS request.
What could be done in order to improve this performance (I'm
aware of
http://www.mapserver.org/optimization/raster.html) ?
Thanks !
Cédric


Wow, that's a big file.  Is that all in one file?  I dont really
know the answer, I've never used anything over 4 gig, but I do have
a few questions:

1) I assume you are IO bound, do you have this on a raid, or
something with fast IO?  Can you check to see if you are CPU bound
or IO bound?

2) if it is one big file, how would you feel about trying it broken
up into smaller files?

-Andy



On 8/2/2010 12:16 PM, Cédric MOULLET wrote:
> Hi Andy,
> Thanks for your answer.
> The dataset is composed of several ECW files, that's why we use 
TILEINDEX.

> The data are hosted on EBS (http://aws.amazon.com/ebs/). It's supposed
> to have normal I/O performance, but probably not fantastic performance.
> Of what I have observed, I would say that the CPU is probably the
> bottleneck.
> My goal is to have a 1s response time. Do I dream too much ?
> Cédric
>


I have had problems where we had lots and lots of little tiny files.  It 
was much quicker to make a single gigabyte file.  But, that again was IO 
problems.


If you really are CPU bound, then I'm not sure what you can do.  Can you 
get your client program to request multiple tiles at once instead of one 
big one?  mapserver wont use more than one cpu per request, so you'll 
need to make multiple requests to use multiple cpu's.


> Of what I have observed, I would say that the CPU is probably the
> bottleneck.

Are you guessing?  How did you investigate it?  Can you run 'vmstat 3' 
for a while and post it?  It's hard to fix unless you know what's broke.


Also, in the mapfile, you can enable debugging for that one layer, one 
of the debug levels includes timing information (its been a while since 
I've done it, but the doc's describe it pretty well).


Also, what size of image is being returned?  Maybe its TCP/IP 
bandwidth/latency problems?  You could compare client side timing with 
the mapfile debug timing... they should be pretty close.  If the mapfile 
shows a quicker time than your webclient then its not mapserver at all.


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


Re: [mapserver-users] local shapefile not rendering

2010-08-02 Thread Andy Colson

On 8/2/2010 10:30 AM, geo3d wrote:


Looking for some insight to further troubleshoot my problem;

pulling my parcels shapefile locally does not render my shapefile:

Mapfile
DATA 'parcels'
Projection
init=epsg:2240
END

However, pulling the data directly from postgresql does render; with the
same projection used
NAME 'Parcels'
 TYPE POLYGON
 CONNECTIONTYPE postgis
 CONNECTION "dbname='' host=* port=5432 user='***'
password='***' sslmode=prefer"
 DATA 'the_geom FROM "parcels" using unique gid using srid=2240'

Can anyone suggest any ideas?
Thanks



Your example is a little small, so its hard to tell.  My first guess is 
SHAPEPATH is not set.


The mapfile should be like:

MAP
  SHAPEPATH '/data/maps/...'
  LAYER
 NAME 'Parcels'
 TYPE POLYGON

-Andy


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


Re: [mapserver-users] WMS Orthophoto performance

2010-08-02 Thread Andy Colson

On 8/2/2010 5:06 AM, Cédric MOULLET wrote:

Hello,
We've got a 150 GB ECW dataset (aerial imagery) and the LAYER
configuration uses a TILEINDEX.
We can observe a WMS request time of about 3 seconds (on a server with
this configuration: 7.5 GB RAM, 4 core, 64 bits / MapServer 5.4.3).
I'd like to know if 3 seconds is considered as a normal response time
for this kind of WMS request.
What could be done in order to improve this performance (I'm aware of
http://www.mapserver.org/optimization/raster.html) ?
Thanks !
Cédric



Wow, that's a big file.  Is that all in one file?  I dont really know 
the answer, I've never used anything over 4 gig, but I do have a few 
questions:


1) I assume you are IO bound, do you have this on a raid, or something 
with fast IO?  Can you check to see if you are CPU bound or IO bound?


2) if it is one big file, how would you feel about trying it broken up 
into smaller files?


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


Re: [mapserver-users] MS-5.2.3 performance on Solaris 10 vs Win XP

2010-07-21 Thread Andy Colson

On 7/21/2010 8:04 AM, Eike Pögel wrote:

Hi all,

my Solaris 10 mapserver is approx 20 times slower than the ready-made
MS4W installation of same version (using same shape files). Would like
to hear, if other users have same/different experiences.

BTW: To build this Solaris MS I used a couple of prebuild libs from
sunfreeware.com (gcc-3.4.6, zlib, proj-4.7.0, etc.). My Solaris build
configuration was:

./configure --without-httpd --with-png --with-gd --with-proj --with-wfs
--with-wcs --with-ogr=../gdal-1.7.2/apps/gdal-config
--with-gdal=../gdal-1.7.2/apps/gdal-config --with-fastcgi=yes
--enable-internal-ld-detect

Any suggestions are appreciated very much. TIA.

--
Mit freundlichen Grüßen

i.A. Eike Pögel




I doubt you are running Solaris and Windows on the exact same hardware. 
 My first guess would be hardware speeds?  Maybe you could bench the IO 
and CPU and compare them.  You could also enable debugging in your 
mapfile, and I believe it'll include timing information.  May help point 
you in a direction.


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


Re: [mapserver-users] PostGIS Layer : get only objects WITHIN view

2010-07-15 Thread Andy Colson

On 7/15/2010 9:47 AM, Guillaume Sueur wrote:

Hi list,

I was wondering if there was an efficient way to display only objects
fully included inside the map viewport. I could mess around with runtime
substitution, but as bbox is already sent, I think there is a way to use
it inside my DATA string.

Thanks for your clues

Guillaume


I think this is already done for you.  You should enable PG statement 
logging and watch the sql its running.  I've done this before and pretty 
sure any time mapserver queried a postgis layer it included the BBOX in 
the where clause.


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


Re: [mapserver-users] rendering difference between 5.6.3 and 5.6.4

2010-07-13 Thread Andy Colson

On 7/13/2010 8:46 AM, Christy Nieman wrote:

Hi,

I've just compiled mapserver 5.6.4 in an FGS enviromnment, and when I
rendered a map I noticed that it was taking a very long time. Once the
image was displayed, it seemed that the largest scale class for each
layer had been used for a rather small scale map. I've attached a 5.6.3
and 5.6.4 example of the same mapfile. Is there something that I haven't
changed that's needed for 5.6.4? I recall reading that 5.6.4 wouldn't
require any modifications for users?

Thanks,
Christy



You didn't by chance use GD to render the first and AGG for the second? 
 Perhaps you requested AGG in 5.4.3 but it was not compiled in, but it 
is now?


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


Re: [mapserver-users] WFS Error "column = 1" on msPostGISLayerGetShape

2010-07-09 Thread Andy Colson

Oh... Yeah... I should pay more attention to the actual message:

> HINT: No operator matches the given name and argument type(s). You might
> need to add explicit type casts.

This was not a "field not found" message, I fixed the wrong thing.. 
oops.  Good catch Carlos.


-Andy



On 7/9/2010 11:15 AM, Carlos Ruiz wrote:

The cell_id column is of the integer type ? or character varying type ?
It must be integer to be able to
compare.

IC Carlos Ruiz

----
*From:* Andy Colson 
*To:* Benoit PESTY 
*Cc:* mapserver-users@lists.osgeo.org
*Sent:* Fri, July 9, 2010 10:23:39 AM
*Subject:* Re: [mapserver-users] WFS Error "column = 1" on
msPostGISLayerGetShape

On 7/9/2010 10:16 AM, Benoit PESTY wrote:
 > Hello,
 >
 > I have a problem configuring a WFS Service.
 >
 > My layer is defined like this:
 >
 > LAYER
 > NAME " forest_plot_layer"
 > TYPE POLYGON
 > STATUS ON
 > METADATA
 > WFS_TITLE "Forest Plots"
 > "gml_include_items" "all"
 > "gml_featureid" "cell_id"
 > END
 > DUMP TRUE
 > CONNECTIONTYPE postgis
 > CONNECTION xx
 > DATA "the_geom FROM forest_plot_layer"
 > CLASS
 > NAME "Forest Plot"
 > STYLE
 > SIZE 3
 > COLOR 0 255 0
 > OUTLINECOLOR 0 255 0
 > END
 > END
 > PROJECTION
 > "init=epsg:3035"
 > END
 > END
 >
 >
 > And I have the follwing error :
 > --
 > [Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.
 > Error (ERROR: operator does not exist: character varying = integer LINE
 > 1: ...l_id" from forest_plot_layer where "cell_id" = 1
 > ^
 > HINT: No operator matches the given name and argument type(s). You might
 > need to add explicit type casts.
 > --
 >
 > My "forest_plot_layer" table only has a "cell_id" column which is the PK
 > and a "the_geom" column.
 >
 > The WMS service works correctly.
 >
 > Does anyone have an idea?
 >
 > Thanks,

This: "gml_featureid" "cell_id"

Seems to be the culprit. I'm not sure what that does, if you dont need
it, delete it.

If you do need it, then I'd guess changing your sql to this would help:


DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as
subq"

... unrelated, I see you dont have "using unique" on your DATA line... I
believe it'll speed things up if you use it. (although I have never
actually tested the claim).

from: http://mapserver.org/input/vector/postgis.html

-Andy

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org <mailto: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] WFS Error "column = 1" on msPostGISLayerGetShape

2010-07-09 Thread Andy Colson

On 7/9/2010 10:16 AM, Benoit PESTY wrote:

Hello,

I have a problem configuring a WFS Service.

My layer is defined like this:

LAYER
NAME " forest_plot_layer"
TYPE POLYGON
STATUS ON
METADATA
WFS_TITLE "Forest Plots"
"gml_include_items" "all"
"gml_featureid" "cell_id"
END
DUMP TRUE
CONNECTIONTYPE postgis
CONNECTION xx
DATA "the_geom FROM forest_plot_layer"
CLASS
NAME "Forest Plot"
STYLE
SIZE 3
COLOR 0 255 0
OUTLINECOLOR 0 255 0
END
END
PROJECTION
"init=epsg:3035"
END
END


And I have the follwing error :
--
[Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.
Error (ERROR: operator does not exist: character varying = integer LINE
1: ...l_id" from forest_plot_layer where "cell_id" = 1
^
HINT: No operator matches the given name and argument type(s). You might
need to add explicit type casts.
--

My "forest_plot_layer" table only has a "cell_id" column which is the PK
and a "the_geom" column.

The WMS service works correctly.

Does anyone have an idea?

Thanks,


This: "gml_featureid" "cell_id"

Seems to be the culprit.  I'm not sure what that does, if you dont need 
it, delete it.


If you do need it, then I'd guess changing your sql to this would help:


DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as 
subq"


... unrelated, I see you dont have "using unique" on your DATA line... I 
believe it'll speed things up if you use it.  (although I have never 
actually tested the claim).


from: http://mapserver.org/input/vector/postgis.html

-Andy

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


Re: [mapserver-users] Mr Sid vs ECW

2010-07-06 Thread Andy Colson

On 7/6/2010 11:10 AM, Mark Volz wrote:

Hello,

Which format is faster ECW or Mr Sid for a large image? P.S. I don’t
think I will be able to use a tile cache for the application I am
developing.

Thanks

Mark Volz

GIS Specialist



Go with ECW.  If you have huge CPU power you may not notice, but I run 
my maps on AMD64 X2 3800+.  Most of the time the cpu sits around 5-10%, 
but MrSID uses huge amounts of cpu to uncompress.  Its noticeably slower.


ECW will be a little bit bigger on disk, but does not use much at all 
for CPU to uncompress.


MrSID is even worse when you have a frontend (like OpenLayers) request 
tiles... it'll request two or three smaller tiles at a time.  My dual 
core was just pegged with requests.  Switching to ECW is smooth, 
regardless whether your frontend requests one big image or many small.


I can recommend Global Mapper as an image converter.  I had several 
gigabytes of MrSid split into thousands of files, and GM converted it 
into one single ECW, several gigabyes in size.


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


Re: [mapserver-users] Re: Limiting the execution time of mapserver

2010-06-22 Thread Andy Colson

On 6/22/2010 2:13 PM, mattmendick wrote:


Thanks for the reply - where would you put this limit statement? I've tried
putting it in the DATA section, like so:

DATA "wkb_geometry from (select * from parcels LIMIT 100) as subquery using
unique ogc_fid using srid=4326"



I was thinking this one...




And none of these seem to work - am I putting the limit statement in the
right spot?


Bummer... I was only guessing, I have never tried it before, maybe the 
query get's re-written (appending where clauses and what not) and the 
limit gets lost.  Sorry 'bout that.


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


Re: [mapserver-users] Limiting the execution time of mapserver

2010-06-22 Thread Andy Colson

On 6/22/2010 9:57 AM, mattmendick wrote:


I have a WFS service running with a large layer in it (nationwide) on
mapserver. The interface that consumes it exposes a text search option where
users can search on the layer, using the PropertyIsLike filter. If someone
searches for something very broad, like "smith" postgres and mapserver go a
bit insane. First postgres does the large query, and returns the response
after a few minutes to mapserver, which proceeds to balloon to 85% of the
memory (the machine has 7 gigs).  Is there any way to stop mapserver from
completing any queries that last more than X seconds?

Thanks a lot!


Do you want all the smiths?  You could add a 'limit 100' to the sql so 
mapserver wouldnt have as much data to chew on...


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


Re: [mapserver-users] Technology to combine with MapServer?

2010-06-18 Thread Andy Colson

On 6/18/2010 7:45 AM, Fia wrote:


Hi!

I run a MapServer application that reads data from a PostgreSQL database
(with PostGIS) and plots them on a map. Now I want to make objects
clickable, so I can for example click on a flag to get a popup with short
info, together with a link. (Or the same popup by hovering over a flag with
the cursor, either works.)

What technology should I use? I have started using OpenLayers and I've
managed to put up a WFS service through MapServer, but I don't know how to
connect the two. Or should I even use some other, better technology? I've
heard people talking about GeoExt, ExtJs, Mapfish, Geoserver and more, but
I'm a a novice here and don't know what to choose. Programming PHP
workarounds is also an option. But I need some guidance in this, I have no
idea which solution is best (fast to accomplish/robust for large
databases/performance wise etc)to choose an object from a map and present
more information about it.

Best regards,
Sofia


I'm using PostGIS, OpenLayers and a little perl to do this.  Here is a 
sample of the site:


http://maps.camavision.com/?map=kossuthia&pin=2202456012

It looks for "interesting" things withing a buffer of the click point 
(so if you are close enough to a street, stream, railroad, etc it'll 
tell you what they are).


I dont use the Mapserver Query* stuff, I kinda wrote my own.  If this is 
the sort of thing you are looking for, and dont mind writing PG stored 
procedures and a little code, I'll describe how I did it.  This might be 
a little more low level... but it gives you lots of control.


Note that you cannot "select" an object.  You just get information about 
objects near where you click.


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


Re: [mapserver-users] performance problem

2010-06-11 Thread Andy Colson

On 6/11/2010 3:49 PM, fedesan wrote:

DATA "geom900913 from (select gid,geom900913 from gis.states_g) as foo
using unique gid using SRID=900913"


I think you'd be ok with:

DATA "geom900913 from gis.states_g using unique gid using SRID=900913"

Dont think it should make a speed difference though

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


Re: [mapserver-users] performance problem

2010-06-11 Thread Andy Colson

On 6/11/2010 3:49 PM, fedesan wrote:


I' having performance problems using postgreSQL 8.4 and mapserver 5.0.0 on a
4 cpu's sever with 16 GB RAM

I was using a mapfile with 10 layers but in order to find out the problem
now i'm using just one layer in a really basic mapfile.
gis.states_g table has only 24 records, one for each state in my country, so
is not a heavy query and i'm starting to think that is a mapserver
problem...is this a 5.0.0 known issue?
When i load the map (using openlayers) i notice that the 4 cpu's goes to
100% for a couple of seconds, and the same happens when i pan or when i zoom
in (this is even worse)
Can anyone give some tips about this? can somebody see an error that i'm
missing?
I'm not using fast-CGI, should i ??



You say cpu's hit 100%, but what's using the cpu?  apache?  postmaster? 
mapserver?


-Andy

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


Re: [mapserver-users] help with mapfile postgis query

2010-05-26 Thread Andy Colson

On 5/26/2010 1:49 PM, pcr...@pcreso.com wrote:

I'm confused, can anyone help?

I want a random subset of features returned each call from a postgis table via 
a wfs layer. I thought a simple SQL could do this pretty easily, but it doesn't 
work from mapserver.


The mapfile data statement:

DATA "geom_ll from (select gid, geom_ll, name, random() as rand
 from coast_poly
 order by rand
 limit 1) as foo using unique gid using srid=4326"

This returns 0 features.

If I change the query to order by gid it works fine&  returns 1 feature.
If I retain order by rand but with no limit it works fine&  returns all the 
features.


If I paste the queries into a psql terminal, all instances work fine: eg:

select gid, name, random() as rand from coast_poly order by randlimit 1;
  gid | name |   rand
-+--+---
1 | NORTH ISLAND | 0.409694513771683
(1 row)


But I cannot get mapserver WFS output to work with both a random order&  a 
limit:

Source for this layer: 
http://localhost/cgi-bin/mapserv?map=/srv/www/htdocs/map_nz/nz_wms_server.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=nz_land
The number of features in this layer: 0

More confusing is that the WFS extent is correct for the feature that is not 
there:

Extents:
In layer spatial reference system units : xMin,yMin 172.643,-41.6138 : 
xMax,yMax 178.551,-34.3934


&  worse, a data statement of:
DATA "geom_ll from (select gid, geom_ll, name, random() as rand
 from coast_poly
 where gid = 3 or gid=1
 order by rand
 limit 2) as foo using unique gid using srid=4326"

sometimes returns 1&  sometimes 0 features (but should return 2), as a wfs 
layer, but as an sql in psql always returns the correct two features, but varies 
the order, as you'd expect:

  corax=# select gid, name, random() as rand
 from coast_poly
 where gid = 3 or gid=1
 order by rand
 limit 2;
  gid |  name  |   rand
-++---
3 | STEWART ISLAND | 0.102461547125131
1 | NORTH ISLAND   | 0.609191857278347
(2 rows)

corax=# select gid, name, random() as rand
 from coast_poly
 where gid = 3 or gid=1
 order by rand
 limit 2;
  gid |  name  |   rand
-++---
1 | NORTH ISLAND   | 0.531711789779365
3 | STEWART ISLAND | 0.784405956044793
(2 rows)


Thanks in advance,

   Brent Wood


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


Do you need the random number returned?  Can you try removing it from 
the select list and change the order to:


"order by random()" instead to see if it makes a difference.


-Andy

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


Re: [mapserver-users] Re: postgres fulltext search

2010-05-05 Thread Andy Colson

On 5/5/2010 9:28 AM, mattmendick wrote:


Correct, that is what I'm asking ultimately. What is the "attributal"
equivalent to !BBOX! if it exists?


Ok, I think I found the spot in the source where it uses 
'PropertyIsLike'.  (I'm found it in FLTGetIsLikeComparisonSQLExpression) 
It's in a totally different spot than the !BOX! stuff.  I dont see any 
way of changing the sql it generates (its pretty hard coded to generate 
'like').  So I dont think using the PropertyIsLike property will ever 
generate anything other than a 'like' or 'ilike' sql.  I also dont see 
any wildcards or variables nearby.


Also note that I am 90% unfamiliar with the source... so I could be wrong.

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


Re: [mapserver-users] Re: postgres fulltext search

2010-05-05 Thread Andy Colson

On 5/5/2010 9:28 AM, mattmendick wrote:


Correct, that is what I'm asking ultimately. What is the "attributal"
equivalent to !BBOX! if it exists?


A quick look into the source (mappostgis.c) , I dont see anything 
similar. However, when it's building the where clause of the sql, it 
tacks on the layer->filter.string if it exists.


If you are using mapscript, you can dynamically update the layer at 
runtime to set the filter, per request (I'm doing this).  You may also 
be able to use the CGI request params (which I have not done, but recall 
seeing in the mailing list before).  So the layer might look like:


LAYER
...
FILTER $MYFILTER$
...
END


Huge guess at the syntax there.

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


Re: [mapserver-users] postgres fulltext search

2010-05-05 Thread Andy Colson

On 5/5/2010 9:14 AM, mattmendick wrote:


We have set up a WFS service connected with postgres loaded up with some
substantial datasets of ~120 million rows. We have run into users wanting to
utilize the filter "PropertyIsLike". The search string and a wildcard
character are specified, and mapserver does a search against postgres,
something like:

WHERE myColumn LIKE "SearchString%"

if the search string was SearchString* and the wildcard set to *. There is
an index on myColumn. The users then tried putting the wildcard at the
beginning of the search string, and this query takes forever as the index on
myColumn no longer matters.

Postgres 8.3 has a full-text search feature (and I believe earlier versions
had this functionality through the use of plugins and/or extensions).  The
documentation is here:
http://www.postgresql.org/docs/8.3/static/textsearch.html

Basically, you index columns as before, but feeding it the output of a
ts_vector() function, where the input is the column you are indexing.  In
order to search on the column, you need to change the WHERE clause to
something like:

WHERE myColumnNowIndexed @@ ts_query('SearchString')

Is there any way to accomplish this in mapserver? I understand from this
page of ms documentation (http://mapserver.org/input/vector/postgis.html)
that it is possible to substitute the bbox parameter of a search in the DATA
entry of a mapfile. Is it possible to alter the WHERE clause of the search
that deals with attribute matching?

Thanks a lot!



How do you do it now?  Do you have something in place using:

> WHERE myColumn LIKE "SearchString%"


I suppose what you're asking is, whats the corresponding variable to !BOX!?

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


Re: [mapserver-users] MapServer Keywords List

2010-04-16 Thread Andy Colson

On 4/16/2010 4:10 AM, Ben Madin wrote:

G'day all,

I realise that this might seem like a developers list query, but is there 
anywhere I can find a nice concise list of MapServer Keywords / Reserved words 
etc. - I'm trying to set up a syntax colouring plugin for BBEdit? (I did try 
searching the site, but didn't get what I was after.)

Alternatively, does anyone have a BBEdit language module for MapServer?

cheers

Ben






I use the vim syntax highlighting, it'll have the keywords:

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


Re: [mapserver-users] converting line object to series of points

2010-04-15 Thread Andy Colson

On 4/15/2010 12:07 PM, Mark Brooks wrote:

Thanks for your insights and help.

The lines I'm working with will have multiple points. They are hurricane
tracks. The tracks are made of points, about 3-12 hours apart.
Therefore, sometimes the points are close and other times very far away
from each other. I can easily connect the track points to create a line.
But I need the points in between each observation so that I can
determine what county landfall occurs. The y=mx+b method will work, but
I was hoping there may be an easier to do it. Or perhaps I'm making the
problem too complicated to begin with??

Mark




Well thats an interesting problem.  I'm not sure how to do it with lines 
or points.  If you had a line, you could tell if it intersects a polygon 
(a county), but then it might intersect many polygons... maybe?


On the other hand if you plot points along the line, checking each time 
if you intersect a polygon (a county), would you plug values into x or 
y?  Increasing or decreasing?  If your points are too far apart you 
might miss a polygon, but if they are too close together you'll waste a 
lot of time processing.


Hum... what if you use a line, find all polygons that intersect that 
line, then find the polygon nearest the start point?


On a side note.. aren't hurricane's really wide?  Wouldn't several 
counties get hit at the same time?


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


Re: [mapserver-users] converting line object to series of points

2010-04-15 Thread Andy Colson

On 4/15/2010 10:51 AM, Mark Brooks wrote:

I'm using PHP Mapscript.  I need a point every X meters along the line.

Mark


Andy Colson wrote:

On 4/15/2010 10:24 AM, Mark Brooks wrote:

I have a line object that I need to to turn into points. How can I
create a series of points from the line object?

Mark
NC State University


A line has many many points. Which are you interested in? Just the
first and last? Any one point on the line? The mid-point? A point
every meter along the line? The closes point on the line to some other
object?

I know of two options:
1) use PostGIS:
select st_centroid(the_geom) from layer

2) use mapscript


-Andy




Does the line have a single start and end point?  (a MULTILINE record 
can have multiple lines (so multiple start and end points, all stuck 
togethor).


In general, find the start and end points, use them to find the equation 
of the line (y=mx+b if I recall correctly), then use that equation to 
find one corrd based on another.  (so, plug in a buch of x's to find 
their y's).


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


Re: [mapserver-users] converting line object to series of points

2010-04-15 Thread Andy Colson

On 4/15/2010 10:24 AM, Mark Brooks wrote:

I have a line object that I need to to turn into points.  How can I
create a series of points from the line object?

Mark
NC State University


A line has many many points.  Which are you interested in?  Just the 
first and last?  Any one point on the line?  The mid-point?  A point 
every meter along the line?  The closes point on the line to some other 
object?


I know of two options:
1) use PostGIS:
select st_centroid(the_geom) from layer

2) use mapscript


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


Re: [mapserver-users] Mapserver vs Geoserver

2010-04-15 Thread Andy Colson

On 4/15/2010 1:07 AM, mani ., wrote:




Mapserver && Geoserver

*3*. Mapserver works with CGI, GeoSever with J2EE. That may entail some 
advantage to GeoServer, since some companies don’t want to work with CGI.


mapserver supports cgi, fastcgi, php, perl, mod_perl, and probably more. 
 I use mod_perl/mapscript myself.



*5*. GeoServer has a web tool administration that eases configuration.


Ick.  I'v played with geoServer and hated the web admin tool.  Could not 
find a damn thing.  Hated setting up layers cuz you have to know the 
magic click sequence.  Not for me.  With a .map file I can write code to 
generate one, or template it, or any other thousand options.  Give me 
vim and .map any day of the week.  Also, I cant stand xml.  Hate it bad. 
 really  bad.


-Andy

ps: your html email really looked bad on my reader, wrapping was screwed 
up, etc, etc


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


Re: [mapserver-users] offtopic, qgis website down?

2010-03-29 Thread Andy Colson

Yeah, an admin on this list fixed it and sent me a note.

-Andy

On 3/29/2010 3:02 PM, Luigi Castro Cardeles wrote:

Here is working qgis.org <http://qgis.org>.

[]'s
Luigi Castro Cardeles


2010/3/29 Andy Colson mailto:a...@squeakycode.net>>

Sorry to be off topic, qgis.org <http://qgis.org> seems to have gone
away.

http://downforeveryoneorjustme.com/

says its down for everyone.

I asked google for a qgis forum or mailing list, which it gave me,
and they don't seem to be talking about it.


Anyone know the status of qgis.org <http://qgis.org>?

-Andy
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org <mailto: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] offtopic, qgis website down?

2010-03-29 Thread Andy Colson

Sorry to be off topic, qgis.org seems to have gone away.

http://downforeveryoneorjustme.com/

says its down for everyone.

I asked google for a qgis forum or mailing list, which it gave me, and 
they don't seem to be talking about it.



Anyone know the status of qgis.org?

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


Re: [mapserver-users] Something odd with queries in 5.6.1

2010-03-10 Thread Andy Colson

On 3/10/2010 3:53 PM, Carlos Ruiz wrote:

Hi all,

I noticed something odd when I do a query with the new 5.6.1 version.

The getFeature method seems to return a NULL value, when it was working
good before the new version update.

Here's the code:

$n = $map->numlayers;

for ($i = 0; $i < $n; $i++) {

$theme = $map->GetLayer($i);

if ($tema->isVisible()) {

^
theme?



if (($regs = $theme->getNumResults()) == 0) {
continue;
}
}
else {
continue;
}

$theme->open();
$values = $theme->getitems();

unset($atts);

for ($reg = 0; $reg < $regs; $reg++) {

$result = $theme->getResult($reg);
// getFeature is returning NULL with the 5.6.1 version
$element = $theme->getFeature($result->shapeindex, $result->tileindex);

for ($value = 0; $value < count($values); $value++) {
$atts[] = $values[$value] . " " . $element->values[$values[$value]];
}

// php crash because $element is a non object
$element->free();

}

$theme->close();

...

}

Any help or idea will be appreciated.

Thanks in advance

IC Carlos Ruiz



___
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] Looking for advice for OGC Services Server hardware requirements

2010-03-10 Thread Andy Colson

On 3/9/2010 4:34 AM, David Alda Fernandez de Lezea wrote:


Hello list,





  So, our doubts have to do with the following subjects:
  - Processor
  - RAM Memory
  - HDD (we know that has to be large, i.e. 1TB - 2TB)
  - Number of network adapters (is advisable to have more than one?)
  - Which OS is best for MapServer, Linux or Windows 2003 (in terms of 
performance)
  - Other suggestions...


Disclamer: I am a linux guy.

Processor is a little hard, a faster processor will grind through the 
imagery faster.  Imagery is CPU intensive.  A fast processor is better 
than multi-core.  For one user.  There is probably a sweet spot for 
multi-user's between fast core and many core.  You'll have to test.


Memory is easy.  Buy as much as you can.

HDD is hard.  Everyone think's CPU, CPU, CPU, and they never pay 
attention to IO.  Lots of loads are IO bound and not CPU bound, so 
buying more and faster CPU's wont help at all.  Here is where OS choice 
will come into play.  Linux has fantastic software raid.  I can 
recommend Linux 100% for fast drive IO across multiple SATA drives.


NIC's: that's really dependent on your load.  If you have the imagery 
local and only get shapes from across the network, then it wouldn't 
require too much network bandwidth.  You didnt give us near enough info 
to help you decide.  You'll have to test.


OS:  That's not the right question.  You have a hammer and screw driver 
in your tool chest.  Use the right tool for the right job.  CGI, for 
example, is faster on Linux because of the way it spawns processes. 
FastCGI/mapscript/threads/etc will be similar on both OS's.  The biggest 
question is what your admins are better at.  Making a windows person 
admin a linux box is just asking for trouble.  A windows person will get 
10 times the performance from a windows box than a linux box.


Other:  You asked a huge question and gave very little usage info.  I'd 
suggest you test, and benchmark.  Set something cheap up and load test 
it.  If you find you are CPU bound, then you'll know where you need to 
invest money.  If you cant make it go any faster and the CPU's are not 
at 100%, then its either NIC or IO.  You'll have to understand your load 
before you buy hardware for it.


I run mapserver on a slackware linux box, with PostGIS db.
cpu: AMD 64 X2 Dual Core Processor 3800+
hd: 3 1TB green Western Digital in raid 5.  I get 100+ Mbs write, and 
130 Mbs read.


The cpu's sit around 5% usage.  I get 70k hits a day.  I have 180 gig of 
imagery, and PostGis db is 2.6 gig.


The box was hand built for $350 bucks, with a few old parts and a few new.

PRODUCTION LEVEL:  this means different things.  To me it means having a 
second $350 box sitting at standby ready to take over if my first box 
dies.  To you it means, (based on your questions and a lot of guessing 
on my part) spending a lot of money on one box that'll be "really good".


I guess, in the end, my advice would be: if money is no object, get 
whatever.  Otherwise, start small and try to understand your load 
requirements.  A $350 linux box will go really far (but then my load is 
neither CPU or IO bound... I just dont have that much traffic).


Don't you hate it when you ask a question, only to be asked more questions?

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


Re: [mapserver-users] changing the color of a line

2010-02-19 Thread Andy Colson

You can try this:

http://mapserver.org/ogc/sld.html

Like I said, I've never used it, have no idea if it'll work.

-Andy



On 2/19/2010 1:41 AM, ahmettemi...@gmail.com wrote:

thank you

Actually, I want to change color of contour map according to
another map that lies beneath of contour map. Otherwise
contours cannot be discerned.

So, it' type is line.

And I thought I might be able to change its color using

"layer.updateFromString("COLOR 245 13 60");"

but it failed.

what might the alternative solutions be ?

regards

tarihinde, Andy Colson  şunu yazdı:
 > On 2/18/2010 1:35 PM, ahmet temiz wrote:
 >
 >
 > hello
 >
 >
 >
 > how can I change the color of a line programmatically in mapscript
environment
 >
 > (preferably in java)
 >
 >
 >
 > regards
 >
 >
 >
 >
 > I think we need a little more info.  Is this line inside a layer...
of type LINE?  Is the layer type POLYGON and you want to change one line
of one polygon?  Is the line the only thing in the layer?  If there are
lots of lines in the layer, do you know how to find the one you want?
 >
 >
 >
 > As an example, which may not be helpful... I have perl mapscript that
highlights a polygon.
 >
 >
 >
 > In my mapfile I created a new, empty layer named annotate_pin, with
coloring defined (green in my case).  I do sql on my PostGIS database to
find the polygon I want to "highlight".  I copy the polygon from the
"parcels" layer into the "annotate_pin" layer.
 >
 >
 >
 > my $layer = $map->getLayerByName('parcels');
 >
 > $layer->open();
 >
 >
 >
 > #newlayer is misnamed... it does exist in the .map file
 >
 > my $newlayer = $map->getLayerByName('annotate_pin');
 >
 > $newlayer->{status} = $mapscript::MS_ON;
 >
 >
 >
 > # sid here is set to the shape I want to copy/highlight
 >
 > $db->pg_result();
 >
 > ($sid) = $q->fetchrow_array;
 >
 >
 >
 > # get the shape
 >
 > my $shp = $layer->getFeature($sid);
 >
 > $layer->close();
 >
 > if (!$shp)
 >
 > {
 >
 >print STDERR " cannot getFeature($sid) \n";
 >
 > }
 >
 >
 >
 > #copy it to a new shape
 >
 > my $shape = $shp->clone();
 >
 >
 >
 > #add new shape into the annotate_pin layer
 >
 > $newlayer->addFeature($shape);
 >
 >
 >
 > ... later we draw with $map, which has one polygon in the
annotate_pin layer.
 >
 >
 >
 > Note that this is one way, there is the new styling options, but it's
all xml and I cant stand xml, so I never even looked at it.  Not sure if
this is at all what you were looking for, but hope it helps.
 >
 >
 >
 > -Andy
 >


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


  1   2   >