Re: [mapserver-users] Testing x64 MapServer

2016-05-20 Thread Vogt, Robert (RCIS)
Good morning all, I'm trying to set Mapserver up in a x64 environment and test 
a map file that previously worked with shp2img

Shp2img crashes with an error saying it can't draw the layer...when I put a 
process monitor on it I notice this path in Operation CreateFile with
A Result of NAME INVALID...does anyone know where this path may be coming from?

E:\uildselease-1800-x64inprojSHARE\proj_def.dat



All help is greatly appreciated!!
-Bob

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Vogt, Robert (RCIS)
Sent: Wednesday, May 18, 2016 4:33 PM
To: Jeff McKenna; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Testing x64 MapServer

I've changed the path to msplugin_mssql2008.dll to be an absolute path and 
verified that it's getting loaded

But I'm still getting the error "Image handling error. Failed to draw layer"

I'm not sure how to debug this going forward? Any help is appreciated!!

Thanks!

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Jeff McKenna
Sent: Wednesday, May 18, 2016 2:36 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Testing x64 MapServer

If I had to guess, it would be that you are not properly pointing to the full 
path to the MSSQL plugin: for example, see
http://ms4w.com/README_INSTALL.html#microsoft-sql-server-2008

I am happy to hear that MS4W is doing so well for sharing your organization's 
spatial needs.  Please feel free to help fund MS4W, to make sure that the MS4W 
product remains so innovative and reliable for your organization in the long 
term.  You can contact me directly at any time to offer that help. Thank you,

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services http://www.gatewaygeomatics.com/




On 2016-05-18 3:17 PM, Vogt, Robert   (RCIS) wrote:
> Good afternoon I’m trying to set up x64 MapServer on Windows 2012 server.
>
>
>
> I’ve been partially successful in that the MapServer dll’s are all 
> there but when I run my .map file through shp2img.exe
>
>
>
> The process is failing on a .map file that worked previously.
>
>
>
> This is what the map file looks like …
>
>
>
> MAP
>
>   NAME USA1
>
>   SYMBOLSET "e:\arcgisserver\basedata\symbols.txt"
>
>   FONTSET "e:\arcgisserver\basedata\fonts.txt"
>
>   STATUS ON
>
>   IMAGETYPE PNG8
>
>   RESOLUTION 72
>
>   IMAGECOLOR 255 255 255
>
>   SHAPEPATH "e:\arcgisserver\basedata"
>
>   UNITS METERS
>
>   PROJECTION "proj=lcc" "lat_1=20" "lat_2=60" "lat_0=40"
> "lon_0=-112.52116185" "x_0=0" "y_0=0" "ellps=GRS80" "units=m"
> "datum=NAD83" END
>
>   SIZE 1500 1500
>
>   EXTENT -45292.7219576058 780481.616003812 45290.5126012127 
> 871065.05991903
>
>   LAYER
>
> STATUS DEFAULT
>
> CONNECTIONTYPE PLUGIN CONNECTION "server=Left Blank on purpose, 
> I’ve tested the connection with a .udl file on the server"
>
> PLUGIN "msplugin_mssql2008.dll"
>
> DATA "shape(geography) from FARMMAPS.GIS.STATE USING INDEX S7_idx 
> USING UNIQUE OBJECTID USING SRID=4269"
>
> NAME "States"
>
> TYPE POLYGON
>
> STATUS DEFAULT
>
> PROJECTION "proj=longlat" "ellps=GRS80" "datum=NAD83" "no_defs" 
> END
>
> LABELITEM "state"
>
> CLASS
>
>   NAME "States"
>
>   STYLE
>
> SYMBOL 0
>
> WIDTH 2 OUTLINECOLOR 255 0 0
>
>   END
>
>   LABEL TYPE truetype
>
> FONT arial
>
> PRIORITY 2
>
> ALIGN center
>
> SIZE 10
>
> COLOR 255 0 0
>
> OUTLINECOLOR 255 255 255
>
> OUTLINEWIDTH 2
>
> MINDISTANCE 300
>
> ANGLE AUTO
>
> WRAP "~"
>
>   END
>
> END
>
>   END
>
> END
>
>
>
>
>
> I have tested the SQL connection string with a .udl file on the server 
> and it is working.
>
> The out put of shp2img.exe looks like this…
>
>
>
> PS E:\rcis\web\MapServerDlls> ./shp2img.exe -m 
> E:\RCIS\Web\MapServerDlls\MapServerTest\map4.map -o 
> E:\RCIS\Web\MapServer
>
> Dlls\MapServerTest\image1.png -all_debug 5
>
> msLoadMap(): 0.000s
>
> msDrawMap(): rendering using outputformat named png8 (AGG/PNG8).
>
> msDrawMap(): WMS/WFS set-up and query, 0.000s
>
> msDrawMap(): Image handling error. Failed to draw layer named 'States'.
>
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'States'. 
>
> msFreeMap(): freeing map at 0067B88C2DE0.
>
>
>


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

[mapserver-users] mapserver basemap

2016-05-20 Thread Eugenio Trumpy
Hello all,

I would like to insert a modern basemap on a running mapserver project.
Currently I set a mapfile including about 15 layers and a raster tif file 
representing
the hillshade of the study area, as basemap.
My aim is to substitute the running base map with something more dynamic as 
well as
with higher resolution and at the same time not heavy to slow down the service.
These basemap aspects are new for me, I found documentation but not so clear 
for me,
I need something easy. What can you suggest me? Is it an hard stuff? or can I 
handle it?
I think I could have at least 2 possibilities: to insert a WMS global layer, 
(and in case can you suggest me
a nice service?), or set up something like tiles service (like OSM), in case 
how??

Thank you in advance,

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

Re: [mapserver-users] define a layers size display in mapfile (mapscript) how???

2016-05-20 Thread Worth Lutz

Hi Jeff,

That is a good idea.  I'll try to add it in there.

*Worth Lutz*


On 5/20/2016 9:51 AM, Jeff McKenna wrote:
Hi Worth, how about adding your code onto a new wiki page, so it isn't 
lost and forgotten?  Maybe add a page in the "Tricks, Tips, and 
HowTos" section at: https://github.com/mapserver/mapserver/wiki


Thanks,

-jeff




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

Re: [mapserver-users] define a layers size display in mapfile (mapscript) how???

2016-05-20 Thread Jeff McKenna
Hi Worth, how about adding your code onto a new wiki page, so it isn't 
lost and forgotten?  Maybe add a page in the "Tricks, Tips, and HowTos" 
section at: https://github.com/mapserver/mapserver/wiki


Thanks,

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-05-20 10:40 AM, Worth Lutz wrote:

I answered this before on this list.

Here is an extraction of some of my code.  I get PDF maps to an accurate
scale when printed.

All steps are necessary and must be in the order described.

$map = new mapObj($mapfile);

$map->selectOutputFormat('PDF');  // defined in mapfile

// set mapsize using pdfMapDef paper sizes
// $map->resolution defaults to 72 pixels/inch
$w = $width_inches  * $map->resolution;
$h = $height_inches * $map->resolution;
$map->setSize($w, $h);   //in pixels

// set to actual sizes set by 'setSize'
$w = $map->width;
$h = $map->height;

$map->setExtent($bounds[0], $bounds[1], $bounds[2], $bounds[3]);

// calculate center point in pixels
// this center will not be very accurate as it is a pixel value??
$x = $w * ($center->x - $map->extent->minx) / ($map->extent->maxx -
$map->extent->minx);
$y = $h - ($h * ($center->y - $map->extent->miny) /
($map->extent->maxy - $map->extent->miny));

$center_pixel = new pointObj();
$center_pixel->setXY($x, $y);

// this zooms the map to scale given in $scaleDemon
// but the center value is not accurate enough for small scale maps
$scaleDenom = 4000;
$success = $map->zoomScale($scaleDenom, $center_pixel, $w, $h,
$map->extent);

if ($success == MS_FAILURE) echo "\n FAILURE OF zoomScale";


// set the desired center in map units to get a better map
$x_mapunits = ;
$y_mapunits = ;

// here setCenter will set the center point of the map based upon
// the center value in map units not pixels
$center_mapunits = new pointObj();
$center_mapunits->setXY($x_mapunits, $y_mapunits);
$success = $map->setCenter($center_mapunits);

if ($success == MS_FAILURE) echo "\n FAILURE OF setCenter";

// ** turn on desired layers here  **

$img = $map->draw();
$outfile = $img->saveWebimage();
*
*
*Worth Lutz*




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

Re: [mapserver-users] define a layers size display in mapfile (mapscript) how???

2016-05-20 Thread Worth Lutz

I answered this before on this list.

Here is an extraction of some of my code.  I get PDF maps to an accurate 
scale when printed.


All steps are necessary and must be in the order described.

$map = new mapObj($mapfile);

$map->selectOutputFormat('PDF');  // defined in mapfile

// set mapsize using pdfMapDef paper sizes
// $map->resolution defaults to 72 pixels/inch
$w = $width_inches  * $map->resolution;
$h = $height_inches * $map->resolution;
$map->setSize($w, $h);   //in pixels

// set to actual sizes set by 'setSize'
$w = $map->width;
$h = $map->height;

$map->setExtent($bounds[0], $bounds[1], $bounds[2], $bounds[3]);

// calculate center point in pixels
// this center will not be very accurate as it is a pixel value??
$x = $w * ($center->x - $map->extent->minx) / ($map->extent->maxx - 
$map->extent->minx);
$y = $h - ($h * ($center->y - $map->extent->miny) / 
($map->extent->maxy - $map->extent->miny));


$center_pixel = new pointObj();
$center_pixel->setXY($x, $y);

// this zooms the map to scale given in $scaleDemon
// but the center value is not accurate enough for small scale maps
$scaleDenom = 4000;
$success = $map->zoomScale($scaleDenom, $center_pixel, $w, $h, 
$map->extent);


if ($success == MS_FAILURE) echo "\n FAILURE OF zoomScale";


// set the desired center in map units to get a better map
$x_mapunits = ;
$y_mapunits = ;

// here setCenter will set the center point of the map based upon
// the center value in map units not pixels
$center_mapunits = new pointObj();
$center_mapunits->setXY($x_mapunits, $y_mapunits);
$success = $map->setCenter($center_mapunits);

if ($success == MS_FAILURE) echo "\n FAILURE OF setCenter";

// ** turn on desired layers here  **

$img = $map->draw();
$outfile = $img->saveWebimage();
*
*
*Worth Lutz*


On 5/20/2016 3:05 AM, ankur chitranshi wrote:

hello All,


How to define a layer display scale in mapfile in mapscript mode.

--
thanks & regards
Ankur Chitranshi


___
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] How to use tiles input

2016-05-20 Thread Jeff McKenna

Hello,

Your timing is impeccable: if you are wondering how to serve tiles 
through MapServer and MapCache and visible through OpenLayers3, 
yesterday I wrote a tutorial on specific steps, with example mapfiles 
and Javascript, for MS4W (Windows) users.  There is likely very useful 
files there for you, if you're the type of person (like me) who prefers 
to start with something that works and modify it for your own data. 
And, it's a wiki, so you can also add/modify the steps yourself :) 
http://www.ms4w.com/trac/wiki/MapCacheOpenLayers3


-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


On 2016-05-19 10:33 PM, jenia mtl wrote:

Hello.

Finally I subscribed and sent the message to the right group. Fe.

Here goes my question:

I have installed Mapserver on my arch machine

Reading the docs, I want to ask a quick question: why is the "tiles"
component (Anatomy of a MapServer App) the input?
Isn't the tiles what this program outputs? Like isn't the output of this
program fed as input to OpenLayers or Leafet for example?


Also, where do I get the tiles? Is it OpenStreetMaps?

And finally, can the tiles be something I draw myself? And how do I
organized them? For example, I might want to have 100 tiles that
represent the earth at resolution 10. How do I name or generally
organize the 100 tiles so that when I ask for the tile "POINT (73.45
45.00)" for example, it gets the correct file and so on?

Thanks in advance.




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

[mapserver-users] define a layers size display in mapfile (mapscript) how???

2016-05-20 Thread ankur chitranshi
hello All,


How to define a layer display scale in mapfile in mapscript mode.

-- 
thanks & regards
Ankur Chitranshi
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] how to define a layers size display in mapfile (mapscript)

2016-05-20 Thread Ankur Kumar
hello All,

ignore previous mail

How to define a layer display  scale in mapfile in mapscript mode.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] how to define a layers display in mapfile (mapscript)

2016-05-20 Thread Ankur Kumar
hello All,

How to define a layer display  scale in mapfile in mapscript mode.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users