Re: [mapserver-users] Remote map server - data tweaking

2012-07-05 Thread Ruslan Nuryadin
Hi,

When using Quantum GIS, I usually use SQL query where clause to filter
PostGIS dataset:
- at Add PostGIS Table(s) dialog, click Build query button
- fill in SQL where clause with any filter condition
- for bounding box filter, use intersection clause like

intersects(the_geom, 'SRID=4326;POLYGON((106 -7,107 -7,107 -6,106 -6,106 -7))')

this will filter dataset that closely match (106, -7) to (107, -6) bounding box

On Fri, Jul 6, 2012 at 11:17 AM, Rahkonen Jukka
 wrote:
> Hi,
>
> Check this TinyOWS example 
> http://mapserver.org/trunk/tinyows/openlayershowtotransactional.html
>
> However, from what I know Qgis does not load all the features but only those 
> which intersect the map window. "Open attribute table" seems to read the 
> attributes from the whole table but for editing attributes of a single 
> feature you can point it with the info tool and then open the "Edit feature 
> form" with right click.
>
> QGis is also a WFS-T client and it can be used for editing data through 
> TinyOWS. The current QGis development version seems to miss the bounding box 
> filter option so it is now downloading the whole table through WSF. Therefore 
> it is unusable with big WFS layers at the moment. Let's hope they will 
> re-activate the BBOX check box soon.
>
> -Jukka Rahkonen-
>
>
>
> 
> Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
> [mapserver-users-boun...@lists.osgeo.org] käyttäjän Matt McClelland 
> [m...@wildwalks.com] puolesta
> Lähetetty: 6. heinäkuuta 2012 4:30
> Vastaanottaja: mapserver-users@lists.osgeo.org
> Aihe: [mapserver-users] Remote map server - data tweaking
>
> Hi All
>
> I am looking for a simple editing tool that will allow me to edit vector map 
> data on my remote mapserver DB (postgres)
> Ideally something like Potlatch 2 (From ww.osm.org)
>
> I want to be able to download a small area of data, move a few notes on a 
> line a bit (or delete it the line), and commit those changes to the DB.
> I have used quantum GIS - It is good, but it seems to download all the data 
> from the table, not just what is in view.
>
> Not really a mapserver question, but somewhat related.
>
> Any ideas welcome - thanks
>
> Matt  :)
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



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


[mapserver-users] PHP mapscript using OracleSpatial

2012-07-05 Thread Jessica Clarke
Hi everyone, 
I successfully queried the same view twice in two separate layers in order to 
show two related shapes, but now I have decided that there are too many options 
(and thus too many mapfiles to create and combinations for the developers on 
the other end to handle) so I am trying to write a php script to generate the 
two new layers according to the parameters passed into the script via url. 
 
I'll paste in my code currently.  I have issues with oraclespatial, and I just 
keep getting errors that the layer can't be drawn.  I'm having a hard time 
finding examples of this use, so I'm just hoping someone might be able to point 
out where I'm going wrong.  The lack of error reporting from php hasn't been 
helping matters either ;) 
 
Please forgive me if I have made a (or several) silly mistake.  I'm new to php, 
oracle, and mapserver. 
 
Cheers, 
Jess
 
URL:  http://local/multiLayer2.php?map=base2.map&map_name="Asset Survey related 
map"orig_type=POLYGON&orig_name=ASSET&orig_id=19117&rel_type=LINE&rel_name=SURVEY&rel_id=42
 ( 'http://local/multiLayer2.php?map=base2.map&map_name="Asset Survey related 
map"orig_type=POLYGON&orig_name=ASSET&orig_id=19117&rel_type=LINE&rel_name=SURVEY&rel_id=42'
 )
This is what I want the url to look like, but currently, I've hardcoded the 
values into the script.
 
MAPFILE:
MAP
 NAME base
 STATUS ON
 SIZE 800 600
 EXTENT 227154 5165779 627108 5614539
 UNITS METERS
 IMAGECOLOR 234 255 255
 SYMBOLSET "base.sym"
 FONTSET "base.list"
 PROJECTION
  "proj=utm"
[..]
##Changeable layers 
 LAYER
  NAME layer1
  TYPE POINT
  STATUS OFF
 END
 
 LAYER
  NAME layer2
  TYPE POINT
  STATUS OFF
 END
## end ##
[..]
END
 
PHP:
 set("name", $_GET['map_name']);
 
//set up layer 1
//set the parameters
 //temp setup
$orig_name = "ASSET";
$orig_id = "19117";
$orig_type = "MS_LAYER_POLYGON";
 
$rel_name = "SURVEY";
$rel_id = "42";
$rel_type = "MS_LAYER_LINE";
 
 //temporary data created 
$orig_data = "asset_shape FROM  FOD.ASSET_RELATED_SHP_MAP USING UNIQUE 
ASSET_ID";
$rel_data = "rel_shape from fod.asset_related_shp_map using unique shape_id";
 
//create the original shape layer
$orig_layer = $map->getLayerByName("layer1");
$orig_layer->set("name", $orig_name);
$orig_layer->set("status", MS_ON);
$orig_layer->set("type", $orig_type);
$orig_layer->set("connectiontype", MS_ORACLESPATIAL);
$orig_layer->set("connection", "mapserver/mapserver@gistest");
$orig_layer->set("data", $orig_data); 
$orig_layer->setProcessing("CLOSE_CONNECTION=DEFER");
$orig_layer->setProjection('+proj=utm +zone=55 +south +ellps=GRS80 
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs');
 //create class within the layer 
  //set the symbology and style

//create the related layer
$rel_layer = $map->getLayerByName("layer2");
$rel_layer->set("name", $rel_name);
$rel_layer->set("status", MS_ON);
$rel_layer->set("type", $rel_type);
$rel_layer->set("connectiontype", MS_ORACLESPATIAL);
$rel_layer->set("connection", "mapserver/mapserver@gistest");
$rel_layer->set("data", $rel_data); 
$rel_layer->setProcessing("CLOSE_CONNECTION=DEFER");
$rel_layer->setProjection('+proj=utm +zone=55 +south +ellps=GRS80 
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs');
 //create class within the layer
  //set the symbology and stylee
 

//draw the map
ms_ResetErrorList();
$map_image=$map->drawQuery();
$error=ms_GetErrorObj();
while($error && $error->code != MS_NOERR)
{
 printf("Error in %s: %s\n", $error->routine, $error->message);
 $error = $error->next();
}
echo $map_image->saveWebImage();
 
?>

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


Re: [mapserver-users] MS4W mapcache

2012-07-05 Thread Rahkonen Jukka
Hi,

Have you tried MS4W 6.1-dev? It should come with Mapcache.
http://www.maptools.org/ms4w/index.phtml?page=downloads.html

-Jukka Rahkonen-


scott159 wrote:

> Hi,

> I would like to use mapcache with package MS4W. Where I could find dll to use 
> it ?

thanks
___
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 get layer name in an identify template?

2012-07-05 Thread Lime, Steve D (DNR)
What do your query strings look like? - Steve


From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] on behalf of Bistrais, Bob 
[bob.bistr...@maine.gov]
Sent: Thursday, July 05, 2012 2:01 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] How to get layer name in an identify template?

I am trying to set up a single template, which will format the results of an 
identify (query by point).  Many of the layers have the same item names, so I’d 
like to use the same template for those layers.   I have this working well, 
except that I’d like the layer name to appear at the top of each query result.  
How can I put this in as a variable that MapServer can interpret?

Below is my sample code of the template.  I put [wms_title] in as the variable 
for the layer name, but this doesn’t work:




[wms_title]<---I want to replace 
[wms_title] with something that will return the layer name


Tile:   [tilename]


Download Image:   [LINK]


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


Re: [mapserver-users] Remote map server - data tweaking

2012-07-05 Thread Rahkonen Jukka
Hi,

Check this TinyOWS example 
http://mapserver.org/trunk/tinyows/openlayershowtotransactional.html

However, from what I know Qgis does not load all the features but only those 
which intersect the map window. "Open attribute table" seems to read the 
attributes from the whole table but for editing attributes of a single feature 
you can point it with the info tool and then open the "Edit feature form" with 
right click.

QGis is also a WFS-T client and it can be used for editing data through 
TinyOWS. The current QGis development version seems to miss the bounding box 
filter option so it is now downloading the whole table through WSF. Therefore 
it is unusable with big WFS layers at the moment. Let's hope they will 
re-activate the BBOX check box soon.

-Jukka Rahkonen-




Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] käyttäjän Matt McClelland 
[m...@wildwalks.com] puolesta
Lähetetty: 6. heinäkuuta 2012 4:30
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Remote map server - data tweaking

Hi All

I am looking for a simple editing tool that will allow me to edit vector map 
data on my remote mapserver DB (postgres)
Ideally something like Potlatch 2 (From ww.osm.org)

I want to be able to download a small area of data, move a few notes on a line 
a bit (or delete it the line), and commit those changes to the DB.
I have used quantum GIS - It is good, but it seems to download all the data 
from the table, not just what is in view.

Not really a mapserver question, but somewhat related.

Any ideas welcome - thanks

Matt  :)

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


[mapserver-users] MS4W mapcache

2012-07-05 Thread scott159
Hi,

I would like to use mapcache with package MS4W. Where I could find dll to use 
it ?

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


[mapserver-users] Remote map server - data tweaking

2012-07-05 Thread Matt McClelland
Hi All

I am looking for a simple editing tool that will allow me to edit vector
map data on my remote mapserver DB (postgres)
Ideally something like Potlatch 2 (From ww.osm.org)

I want to be able to download a small area of data, move a few notes on a
line a bit (or delete it the line), and commit those changes to the DB.
I have used quantum GIS - It is good, but it seems to download all the data
from the table, not just what is in view.

Not really a mapserver question, but somewhat related.

Any ideas welcome - thanks

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


Re: [mapserver-users] mapfile to geoserver conversion tools?

2012-07-05 Thread Stephen Woodbridge

Opened issue: https://github.com/mapserver/mapserver/issues/4380 for this.

On 7/5/2012 8:17 PM, Stephen Woodbridge wrote:

only 16 of 32 layers generated useful SLD files using perl mapscript;

Anyone tried this on 6.2?  Is this a bug?
Any ideas how to work around this isue?

-Steve W

Details follow:

MapServer version 6.2.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE

Here is my perl script:

woodbri@mappy:~/work/geoserver$ cat mapfile2sld
#!/usr/bin/perl -w
use strict;
use mapscript;

sub Usage {
 die "Usage: mapfile2sld mapfile out_dir\n";
}

my $mf  = shift @ARGV || Usage();
my $dir = shift @ARGV || Usage();

mkdir $dir, 0777;
die "Directory '$dir' does not exist or failed to create it! : $!\n"
 unless -d $dir;

my $oMap = new mapscript::mapObj( $mf );

for (my $i=0; $i<$oMap->{numlayers}; $i++) {

 my $oLay = $oMap->getLayer($i);

 my $SLD = $oLay->generateSLD();

 my $fname = "$dir/" . $oLay->{name} . ".xml";
 open(OUT, ">$fname") || die "Failed to create '$fname'! : $!\n";
 print OUT $SLD;
 close(OUT);
}

16 of the files contain nothing more than this:

woodbri@mappy:~/work/geoserver/tiger2011-mc$ cat linear_water.xml
http://www.opengis.net/sld";
xmlns:gml="http://www.opengis.net/gml";
xmlns:ogc="http://www.opengis.net/ogc";
xmlns:xlink="http://www.w3.org/1999/xlink";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd";>


Here is the layer definition:

 LAYER
 NAME "linear_water"
 METADATA
 "ows_title" "Streams and Rivers"
 "ows_srs"   "EPSG:4269 EPSG:4326"
 "ows_abstract"  "Streams and Rivers from the U.S. Census
LINEARWATER data layer."
 END
 TYPE LINE
 TILEINDEX "tidx-LINEARWATER"
 PROJECTION
 "+proj=longlat +ellps=GRS80 +datum=NAD83" #EPSG: 4269
 END
 #INCLUDE "map-LINEARWATER.inc"
   # map-LINEARWATER.inc
   MAXSCALEDENOM 15000
   CLASS  # water
 STYLE
   COLOR "#a5bfdd"
   WIDTH 1.0
 END
 LABEL
   MAXSCALEDENOM 1
   TYPE TRUETYPE
   FONT "sans-italic"
   SIZE 8
   COLOR "#627A9D"
   OUTLINECOLOR "#B3C9E2"
   PARTIALS FALSE
   MINDISTANCE 250
   MINFEATURESIZE 10
   BUFFER 4
   ANGLE FOLLOW
   PRIORITY 4
 END
   END
 END



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


Re: [mapserver-users] mapfile to geoserver conversion tools?

2012-07-05 Thread Stephen Woodbridge

On 7/5/2012 6:48 PM, Stephen Woodbridge wrote:

Hi All,

Does anyone know if there is a mapfile to geoserver conversion tool?
Sorry, I have never used geoserver and have no idea on this one.


Ok, so after a little additional research, it looks like one can use the 
mapscript generateSLD() function to convert mapfile layer definitions to 
SLD.


BUT! only 16 of 32 layers generated useful SLD files using perl mapscript;

Anyone tried this on 6.2?  Is this a bug?
Any ideas how to work around this isue?

-Steve W

Details follow:

MapServer version 6.2.0-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG 
SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR 
INPUT=GDAL INPUT=SHAPEFILE


Here is my perl script:

woodbri@mappy:~/work/geoserver$ cat mapfile2sld
#!/usr/bin/perl -w
use strict;
use mapscript;

sub Usage {
die "Usage: mapfile2sld mapfile out_dir\n";
}

my $mf  = shift @ARGV || Usage();
my $dir = shift @ARGV || Usage();

mkdir $dir, 0777;
die "Directory '$dir' does not exist or failed to create it! : $!\n"
unless -d $dir;

my $oMap = new mapscript::mapObj( $mf );

for (my $i=0; $i<$oMap->{numlayers}; $i++) {

my $oLay = $oMap->getLayer($i);

my $SLD = $oLay->generateSLD();

my $fname = "$dir/" . $oLay->{name} . ".xml";
open(OUT, ">$fname") || die "Failed to create '$fname'! : $!\n";
print OUT $SLD;
close(OUT);
}

16 of the files contain nothing more than this:

woodbri@mappy:~/work/geoserver/tiger2011-mc$ cat linear_water.xml
xmlns="http://www.opengis.net/sld"; 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.opengis.net/sld 
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd";>



Here is the layer definition:

LAYER
NAME "linear_water"
METADATA
"ows_title" "Streams and Rivers"
"ows_srs"   "EPSG:4269 EPSG:4326"
"ows_abstract"  "Streams and Rivers from the U.S. Census 
LINEARWATER data layer."

END
TYPE LINE
TILEINDEX "tidx-LINEARWATER"
PROJECTION
"+proj=longlat +ellps=GRS80 +datum=NAD83" #EPSG: 4269
END
#INCLUDE "map-LINEARWATER.inc"
  # map-LINEARWATER.inc
  MAXSCALEDENOM 15000
  CLASS  # water
STYLE
  COLOR "#a5bfdd"
  WIDTH 1.0
END
LABEL
  MAXSCALEDENOM 1
  TYPE TRUETYPE
  FONT "sans-italic"
  SIZE 8
  COLOR "#627A9D"
  OUTLINECOLOR "#B3C9E2"
  PARTIALS FALSE
  MINDISTANCE 250
  MINFEATURESIZE 10
  BUFFER 4
  ANGLE FOLLOW
  PRIORITY 4
END
  END
END
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] World file creation

2012-07-05 Thread Brent Fraser

Jeff,

Most of us let a client-side (browser) JavaScript library like 
OpenLayers handle the screen <-> projection calculation (among a lot of 
other things).  have a look at GeoMoose (http://www.geomoose.org) as a 
framework to bring together the server-side and client-side components.


Best Regards,
Brent Fraser

On 7/5/2012 4:13 PM, Jeff Lake wrote:

Thanks for the reply ...
Lets ask this ..
I am setting up an open source weather mapping application (php)
I already know most of my target audience will not be able to install
MapServer and or proj4.
I have been trying to get a handle on various map projection's.
decided to use 3
Grid (or flat non-projected)
Mercator
and Lambert Conformal Conic

The first 2 was easy enough creating the needed Classes
to convert Lat/Long to screen pixel X/Y

Lambert has me lost ... every script I have found
be it C, perl, python, or php all return me  X/Y in meter's

but for the life of me .. I cannot or have not found the magic
formula to convert the meter's to screen X/Y

I have looked at gPoint, PHPproj4, but they all go no further
then meter's (or it at least seems like it)

-Jeff Lake
MichiganWxSystem.com
WeatherMichigan.net
TheWeatherCenter.net
GRLevelXStuff.com

On 7/4/2012 9:31, Brent Fraser wrote:

Jeff,

  World files use projected x/y coordinates.  Use the Proj4 library 
functions (in Mapscript)  to project the upper left and lower right 
spherical lon/lat coordinates to x/y, then use the image size 
(length, width)  to calculate the values for the world file 
(http://en.wikipedia.org/wiki/World_file)


Best Regards,
Brent Fraser

On 7/3/2012 8:27 PM, Jeff Lake wrote:

Maybe I'm not searching on the correct terms.
But what is the magic formula for creating world files ??

I have a map of the US with the following projection info
ullat=53.3638
ullon=-130.964
lrlat=18.2977
lrlon=-69.1058
sp1=0
sp2=39
cm=-95.5
rlat=36.5
width=640
height=480
projection=lambert

now how on earth do you figure the meter per pixel??
prefer php, but guess I could convert














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


[mapserver-users] mapfile to geoserver conversion tools?

2012-07-05 Thread Stephen Woodbridge

Hi All,

Does anyone know if there is a mapfile to geoserver conversion tool?
Sorry, I have never used geoserver and have no idea on this one.

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


Re: [mapserver-users] World file creation

2012-07-05 Thread Jeff Lake

Thanks for the reply ...
Lets ask this ..
I am setting up an open source weather mapping application (php)
I already know most of my target audience will not be able to install
MapServer and or proj4.
I have been trying to get a handle on various map projection's.
decided to use 3
Grid (or flat non-projected)
Mercator
and Lambert Conformal Conic

The first 2 was easy enough creating the needed Classes
to convert Lat/Long to screen pixel X/Y

Lambert has me lost ... every script I have found
be it C, perl, python, or php all return me  X/Y in meter's

but for the life of me .. I cannot or have not found the magic
formula to convert the meter's to screen X/Y

I have looked at gPoint, PHPproj4, but they all go no further
then meter's (or it at least seems like it)

-Jeff Lake
MichiganWxSystem.com
WeatherMichigan.net
TheWeatherCenter.net
GRLevelXStuff.com

On 7/4/2012 9:31, Brent Fraser wrote:

Jeff,

  World files use projected x/y coordinates.  Use the Proj4 library 
functions (in Mapscript)  to project the upper left and lower right 
spherical lon/lat coordinates to x/y, then use the image size (length, 
width)  to calculate the values for the world file 
(http://en.wikipedia.org/wiki/World_file)


Best Regards,
Brent Fraser

On 7/3/2012 8:27 PM, Jeff Lake wrote:

Maybe I'm not searching on the correct terms.
But what is the magic formula for creating world files ??

I have a map of the US with the following projection info
ullat=53.3638
ullon=-130.964
lrlat=18.2977
lrlon=-69.1058
sp1=0
sp2=39
cm=-95.5
rlat=36.5
width=640
height=480
projection=lambert

now how on earth do you figure the meter per pixel??
prefer php, but guess I could convert









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


[mapserver-users] How to get layer name in an identify template?

2012-07-05 Thread Bistrais, Bob
I am trying to set up a single template, which will format the results of an 
identify (query by point).  Many of the layers have the same item names, so I'd 
like to use the same template for those layers.   I have this working well, 
except that I'd like the layer name to appear at the top of each query result.  
How can I put this in as a variable that MapServer can interpret?

Below is my sample code of the template.  I put [wms_title] in as the variable 
for the layer name, but this doesn't work:




[wms_title]<---I want to replace 
[wms_title] with something that will return the layer name


Tile:   [tilename]


Download Image:   [LINK]


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


Re: [mapserver-users] mapserver-users Digest, Vol 54, Issue 5

2012-07-05 Thread Wang, Ya
Flavio,
Thank you very much for your help. Really appreciate it. 

Ya

-Original Message-
From: Flavio Hendry [mailto:fla...@tydac.ch] 
Sent: Thursday, July 05, 2012 1:38 AM
To: Wang, Ya
Cc: mapserver-users@lists.osgeo.org
Subject: Re: mapserver-users Digest, Vol 54, Issue 5

Hi Ya

yeah, you'd need ArcGIS Server ... which has a very big price tag on it. 
The best way to use MapServer Layers and Maps in other sw is WMS and/or 
WFS. Same for ArcGIS. See i.e.

http://mapserver.org/ogc/wms_server.html

Mit freundlichem Gruss / Best regards
Flavio Hendry


TYDAC Inc.  - http://www.tydac.ch
Web Mapping - http://www.mapserver.ch
Swiss Maps  - http://www.mapplus.ch

  Mit freundlichen Gruessen / Kind Regards
 Flavio Hendry, CEO - mailto:fla...@tydac.ch
 TYDAC AG - http://www.tydac.ch
Geographic Information Solutions
   Optingenstrasse 27 -- CH-3013 Bern
   Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860

Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27




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


Re: [mapserver-users] Mapserver docs and i18n

2012-07-05 Thread Yves Jacolin (Free)
Hello,

I am now ok with this pull request from Thomas (we discussed on Francophone 
mailing list also). 

It could improve contribution from non technical user (if a pootle 
infrastructure exists, unfortunately which add more work for sysadmin).

Y.
Le mercredi 4 juillet 2012 21:51:03 Thomas Gratier a écrit :
> Hello,
> 
> My answer are inline with bold cross *XX* just before (for mail
> in html)
> Uline of inline of inline start to be difficult to read ;)
> 
> Regards
> 
> ThomasG77
> 
> 2012/7/4 thomas bonfort 
> 
> > Hi Thomas,
> > 
> > I'm all for simplifying the translation workflow. I tend to dislike
> > the current one we have setup because it is difficult for translators
> > to keep track of what has been added/modified in the english version,
> > resulting in outdated translated docs which in my opinion is worse
> > than having no translation at all.
> > 
> > More inline...
> > 
> > On Tue, Jul 3, 2012 at 10:13 PM, Thomas Gratier
> > 
> >  wrote:
> > > Hello Jeff, hello all,
> > > 
> > > # First think to understand
> > > 
> > > I praise the Mapserver community and the team behind the engine.
> > > I'm a big fan of Mapserver and Sphinx and I've always love the really
> > 
> > great
> > 
> > > documentation but I know people who deal only with there native language
> > 
> > to
> > 
> > > do the job. So translation is a core part of a project to extend
> > 
> > popularity
> > 
> > > accross countries (althought Mapserver popularity is already
> > > established)
> > > 
> > > My motivation is to deal with the french translation with i18n and not
> > 
> > with
> > 
> > > RST.
> > > I want to make think better, the way we do it is good but can be
> > > improve.
> > > Why? Some thoughts to explain below
> > > 
> > > 
> > > # Advantages
> > > 
> > > 1. Fulfillment
> > > 
> > > Really important for me because a community is based on humans who
> > > search
> > > small and big achievements and it's more easy with i18n to measure the
> > 
> > job.
> > 
> > > Imagine one rst file of 1000 lines (around 100 lines of empty lines or
> > > special rst declarations)
> > > 
> > > You generate is equivalent in pot file.
> > > The number of string to translate is 430
> > > 
> > > Offline:
> > > Step by step you see what you've done and can by example, see that
> > > you've
> > > done 86 lines so, 20% of the job is done for the file.
> > > Your objective to go until 30%. When you reach it, you're happy. You've
> > 
> > done
> > 
> > > 10% more of the file translation.
> > > 
> > > Online:
> > > See this online app based on pottle for the Qgis community. You can see
> > 
> > the
> > 
> > > http://translate.qgis.org/fr/qgis-user-guide/ example.
> > > In this case, you can make a survey of users who contribute, you can
> > 
> > review
> > 
> > > with others, you now if a file translation is completed. You can
> > 
> > distribute
> > 
> > > task between the community of users and not only of advanced users /
> > > developpers.
> > > 
> > > You can have a dedicated community of translators who care about content
> > 
> > and
> > 
> > > not about the way to use sphinx and others technical things.
> > > 
> > > 2. Separate presentation from contents
> > > 
> > > When you generate pot files, the string length is quite short. You don't
> > > have to care too much about rst indent : you will not break anything.
> > > If the presentation change, you content don't. I'm thinking about the
> > 
> > annual
> > 
> > > change for FOSS4G image. You have to backport it manually with a merge
> > > in
> > > every langage version.
> > > 
> > > 3. History and maintainability
> > > 
> > > ## The typical workflow now
> > > 
> > > You cut and paste a rst file and you make the translation. Ok it's
> > > nice!!
> > > Why does I need to care about i18n? This guy is crazy!!
> > > 
> > > Because now imagine, you've done the translation 3 years ago (your
> > 
> > community
> > 
> > > said "do it" and it was done).
> > > 
> > > The content was in english (the letter are use to represent a block of
> > > content in master version and number for content of translated example)
> > > 
> > > In the past
> > > 
> > > EnglishFrench
> > > 
> > > A  111
> > > B  22
> > > C  33
> > > D  44
> > > E  55
> > >   77
> > > H  88
> > > 
> > > Nowadays
> > > 
> > > B  ??
> > > C  ??
> > > D  ??
> > > FF  ??
> > >   ??
> > > H  ??
> > > 
> > > The way you do if you kept during three years the file you use to
> > 
> >

Re: [mapserver-users] php_mapscript not being loaded

2012-07-05 Thread William Kyngesburye
On Jul 5, 2012, at 9:39 AM, Stefan Schwarzer wrote:

> Hi there,
> 
> I thought I would have finally got over with all the errors while installing 
> everything anew (php, apache, postgres, mapserver).

apache?  You're not using the system apache?  If it's a major version change 
from the system apache, the APIs that php uses may have changed.

> But hadn't tested mapserver yet… Did all the installation with the latest 
> Kyngchaos libraries.
> 
> Running  "http://localhost/testphp.php";; but don't see any mapserver or 
> mapscript. Nothing in there.
> 
> There is a "php_mapscript.so" in 
> "/usr/local/php5cgi/lib/php/extensions/no-debug-non-zts-20090626". I added 
> "extension = php_mapscript.so" to php.ini, as well as "extension_dir = 
> "/usr/local/php5cgi/lib/php/extensions"".

No need to set extension_dir, it defaults to the correct dir, which is not as 
you set it but includes the no-debug... subdir.

> Restarted the server, "sudo /usr/sbin/apachectl restart".

graceful is all that's needed: sudo apachectl graceful, but it probably doesn't 
matter.

> But still no Mapscript in testphp.php… Did it really restart and load php.ini 
> now?. Any way to check that? It should work that way, no?
> 
> Thanks for any help!
> 
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-
William Kyngesburye 
http://www.kyngchaos.com/

"I ache, therefore I am.  Or in my case - I am, therefore I ache."

- Marvin


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


Re: [mapserver-users] Problem querying personal GDB

2012-07-05 Thread Brent Fraser

Bob,
  It's just a guess on my part.  There was a similar post on the 
Geomoose list last year:

http://osgeo-org.1560.n6.nabble.com/Geomoose-users-query-php-and-pgdb-tt4929185.html#a4929188


Best Regards,
Brent Fraser

On 7/5/2012 8:08 AM, Bistrais, Bob wrote:


I see this is in the section for using a PostGIS layer.  Is that 
applicable for an ESRI Personal GDB?


*From:*Brent Fraser [mailto:bfra...@geoanalytic.com]
*Sent:* Tuesday, July 03, 2012 6:01 PM
*To:* Bistrais, Bob
*Cc:* mapserver-users@lists.osgeo.org
*Subject:* Re: [mapserver-users] Problem querying personal GDB

Bob,

  You may need to add a "using unique" clause  like "using unique gid" 
http://www.mapserver.org/input/vector/postgis.html#data-access-connection-method



Best Regards,
Brent Fraser

On 7/3/2012 2:12 PM, Bistrais, Bob wrote:

Please excuse me if this is redundant- I've also posted this to
the GeoMoose list, and I can't remember what I've posted where on
this issue.

I am building an application with MapServer 6.0.2, and GeoMoose
2.6 on the front end.  One of the layers is contained in an ESRI
personal Geodatabase, i.e. a Microsoft Access database.

This layer displays properly.  I can also do an Identify on it and
get expected results.  It's when I try to do a Search (a select by
attributes) when things fall apart.  Checking the error log, I see
msEvalExpression(): General error message. Cannot evaluate
expression, no item index defined.

It's also worth noting that, if I convert the layer to shapefile
and use that in the application, it will work.  But there's a few
operational considerations that make it preferable to use the
GDB.  So the problem seems to be with querying the MDB.  Does
anyone have any ideas?




___

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] php_mapscript not being loaded

2012-07-05 Thread Stefan Schwarzer
Hi there,

I thought I would have finally got over with all the errors while installing 
everything anew (php, apache, postgres, mapserver). But hadn't tested mapserver 
yet… Did all the installation with the latest Kyngchaos libraries.

Running  "http://localhost/testphp.php";; but don't see any mapserver or 
mapscript. Nothing in there.

There is a "php_mapscript.so" in 
"/usr/local/php5cgi/lib/php/extensions/no-debug-non-zts-20090626". I added 
"extension = php_mapscript.so" to php.ini, as well as "extension_dir = 
"/usr/local/php5cgi/lib/php/extensions"". Restarted the server, "sudo 
/usr/sbin/apachectl restart". But still no Mapscript in testphp.php… Did it 
really restart and load php.ini now?. Any way to check that? It should work 
that way, no?

Thanks for any help!


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


Re: [mapserver-users] Problem querying personal GDB

2012-07-05 Thread Bistrais, Bob
I see this is in the section for using a PostGIS layer.  Is that applicable for 
an ESRI Personal GDB?

From: Brent Fraser [mailto:bfra...@geoanalytic.com]
Sent: Tuesday, July 03, 2012 6:01 PM
To: Bistrais, Bob
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Problem querying personal GDB

Bob,

  You may need to add a "using unique" clause  like "using unique gid" 
http://www.mapserver.org/input/vector/postgis.html#data-access-connection-method



Best Regards,

Brent Fraser
On 7/3/2012 2:12 PM, Bistrais, Bob wrote:
Please excuse me if this is redundant- I've also posted this to the GeoMoose 
list, and I can't remember what I've posted where on this issue.

I am building an application with MapServer 6.0.2, and GeoMoose 2.6 on the 
front end.  One of the layers is contained in an ESRI personal Geodatabase, 
i.e. a Microsoft Access database.

This layer displays properly.  I can also do an Identify on it and get expected 
results.  It's when I try to do a Search (a select by attributes) when things 
fall apart.  Checking the error log, I see msEvalExpression(): General 
error message. Cannot evaluate expression, no item index defined.

It's also worth noting that, if I convert the layer to shapefile and use that 
in the application, it will work.  But there's a few operational considerations 
that make it preferable to use the GDB.  So the problem seems to be with 
querying the MDB.  Does anyone have any ideas?




___

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] Python MapScript compile error

2012-07-05 Thread Alan Boudreault
Hmm... I think we already  ship MapServer with the C wrapper generated. 
IIRC, you can use the standard way to build the python module also, 
which does not require swig:


cd mapscript/python && python setup.py build && python setup.py install

Alan

On 12-07-05 01:08 AM, Umberto Nicoletti wrote:

python mapscript now requires swig 2.x: install it then rerun configure
and make

hth,
Umberto

On Thursday, July 5, 2012, Jackey Cheung wrote:

Hi all,

Not sure if i've done anything wrong. I've met the "Unknown option:
-a" while compiling Python MapScript.

MapServer: Git trunk, CentOS 6 box running on Intel Pentium D.
./configure --with-wms --with-wfs --with-curl --with-jpeg
--with-freetype --with-png --with-threads --with-postgis --with-xml2
--with-libiconv --with-proj --with-ogr --with-gdal --with-cairo
--with-ftgl --with-opengl --with-threads --with-geos --with-postgis
--with-mysql --with-wmsclient --with-wfsclient --with-sos --with-wcs
--with-curl --with-kml --with-xml-mapfile --with-xslt --with-fastcgi
--with-exempi --with-fribidi-config --with-zlib --with-gd
--with-postgis --with-mysql --with-php --with-libsvg-cairo
--enable-fast-nint --enable-proj-fastpath --enable-point-z-m
--enable-python-mapscript

Although I don't need all these features yet, I've decided to test
compiling all of them in case I need them in future. Configure went
well, and finished with everything. But while compiling Python:
cd mapscript/python; make;
make[1]: Entering directory
`/home/jackey.cheung/mapserver-6.2.0-beta1/mapscript/python'
python -shadow -modern -templatereduce -fastdispatch -fvirtual
-fastproxy -modernargs -castmode -dirvtable -fastinit -fastquery
-noproxydel -nobuildnone -DUSE_PROJ_FASTPATHS  -DUSE_POINT_Z_M
  -DUSE_FASTCGI -DUSE_SVG_CAIRO -DUSE_CAIRO -DUSE_FRIBIDI
-DUSE_FRIBIDI2 -DUSE_EXSLT -DUSE_XSLT -DUSE_XMLMAPFILE -DUSE_WMS_LYR
-DUSE_WFS_LYR -DUSE_SOS_SVR -DUSE_LIBXML2 -DUSE_CURL
-DUSE_CURLOPT_PROXYAUTH -DUSE_KML -DUSE_EXEMPI -DUSE_WCS_SVR
-DUSE_WFS_SVR -DUSE_WMS_SVR  -DUSE_MYSQL -DUSE_POSTGIS
-DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR -DUSE_GEOS
  -DHAVE_SYNC_FETCH_AND_ADD -DUSE_THREAD -DUSE_PROJ -DUSE_OGL
-DUSE_FTGL  -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 -o mapscript_wrap.c ../mapscript.i
Unknown option: -a
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

Any clue?



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




--
Alan Boudreault
http://www.mapgears.com/


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


[mapserver-users] mapserver fastcgi warnings when msQueryByPoint() Search returns no results

2012-07-05 Thread Thomas Joseph
I am not sure if this is a problem or not but I was wondering if anyone
else has experienced fastcgi warnings with every msQueryByPoint that
returns no results ?  Everything works as expected when querying a point
that returns a result or simply panning or zooming the map.  However,
when a user clicks on the map and the query returns no results the
fastcgi terminates the pid and creates a new one.  Is this normal
behavior ?  I am very much a novice with fastcgi but it seems like this
will slow things down and is counter intuitive to using fastcgi.  The
user experience is not affected but if we could make things faster that
would always be good.



We are using the following setup:

Ubuntu 64bit Server - 10.10

Mapserver 6.0.1

Apache/2.2.16

mod-fastcgi 2.4.6-1



Below I have included a except of the mapserver MS_ERRORFILE and the
apache2 error log:



MS_ERRORFILE

[Thu Jul  5 21:42:22 2012].92065 CGI Request 2 on process 27946

[Thu Jul  5 21:42:22 2012].231782 msQueryByPoint(): Search returned no
results. No matching record(s) found.

[Thu Jul  5 21:42:22 2012].231829 msFreeMap(): freeing map at 0x8f983d0.





/var/log/apache2/error.log

[Thu Jul 05 21:42:22 2012] [warn] FastCGI: server
"/usr/lib/cgi-bin/mapserv.fcgi" (pid 27946) terminated by calling exit
with status '0'

[Thu Jul 05 21:42:22 2012] [warn] FastCGI: server
"/usr/lib/cgi-bin/mapserv.fcgi" restarted (pid 27948)




--
THIS EMAIL IS CONFIDENTIAL.  Its use or disclosure by any person other than the 
addressee is unauthorised.  Anyone other than the intended recipient must not 
rely on the content of this email or any attachment to it.  The sender cannot 
guarantee that this email or any attachment to it is free of computer viruses 
or other conditions which may damage or interfere with other computer systems.
--

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


Re: [mapserver-users] mapserver-users Digest, Vol 54, Issue 5

2012-07-05 Thread Flavio Hendry

Hi Ya

yeah, you'd need ArcGIS Server ... which has a very big price tag on it. 
The best way to use MapServer Layers and Maps in other sw is WMS and/or 
WFS. Same for ArcGIS. See i.e.


http://mapserver.org/ogc/wms_server.html

Mit freundlichem Gruss / Best regards
Flavio Hendry


TYDAC Inc.  - http://www.tydac.ch
Web Mapping - http://www.mapserver.ch
Swiss Maps  - http://www.mapplus.ch

  Mit freundlichen Gruessen / Kind Regards
 Flavio Hendry, CEO - mailto:fla...@tydac.ch
 TYDAC AG - http://www.tydac.ch
Geographic Information Solutions
   Optingenstrasse 27 -- CH-3013 Bern
   Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860

   Location: http://www.mapplus.ch/adr/bern/optingenstrasse/27




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