Re: AW: [MAPSERVER-USERS] cannot compile --with-fastcgi

2008-09-18 Thread dzizes

Hi!

I'am having similar problem. Did you find solution?

michal
-- 
View this message in context: 
http://www.nabble.com/cannot-compile---with-fastcgi-tp15957269p19547800.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

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


[mapserver-users] geographical coordinates to utm

2008-09-18 Thread Emilio López Pasamontes
Hi,

Might I turn geographical coordinates to utm with Mapserver? Can someone 
explain to me how to do it, please?

Thank you for everything and sorry for my english

___
Emilio López Pasamontes, Área de Desarrollo
Servicio de Informática , SGT 
Consejería  de Medio Ambiente y Desarrollo Rural
C/ Quintanar de la Orden, s/n
45071, Toledo, España [EMAIL PROTECTED]


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


RE: [mapserver-users] geographical coordinates to utm

2008-09-18 Thread Kralidis,Tom [Burlington]
 
In the context of MapServer, you could use shapeObj->project within Mapscript.  
You could always achieve this, of course, through pre-processing with 
proj/ogr2ogr.

..Tom







From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emilio 
López Pasamontes
Sent: 18 September, 2008 4:40 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] geographical coordinates to utm 


Hi,
 
Might I turn geographical coordinates to utm with Mapserver? Can 
someone explain to me how to do it, please?
 
Thank you for everything and sorry for my english
 
___
Emilio López Pasamontes, Área de Desarrollo
Servicio de Informática , SGT 
Consejería  de Medio Ambiente y Desarrollo Rural
C/ Quintanar de la Orden, s/n
45071, Toledo, España [EMAIL PROTECTED]
 

 

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


Re: [mapserver-users] rfc43 gtile returning blank images, while WMS works

2008-09-18 Thread akrherz

On Tue, 9 Sep 2008, [EMAIL PROTECTED] wrote:


On Mon, 8 Sep 2008, Paul Ramsey wrote:


 Nothing leaps out. Are you sure they are equivalent? Zoom level two is
 pretty far out, do you have scale dependency in that layer?


Hi Paul, thanks for the response.  I choose a far out zoom level to ensure 
there is data in the view for folks to see.  When I run the gtile request, 
mapserver logs the bounding box, which I then fed to build the WMS request. 
My scale setting for that layer is:


  MINSCALE 0
  MAXSCALE 46500

My RASTER datasource layers is already projected in 900913...


Thanks to some generous help offline from Paul, he discovered that my 
MAXSCALE was not large enough for the GTile requests, but for some reason 
worked with the WMS 900913 requests.  Shrug.  Anyway, I bumped my MAXSCALE 
up by a factor of 1,000,000 and now the GTile images work. Good enough for 
me! :)


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


Re: [mapserver-users] Re: JOIN in a mapfile from a shapefile to a MySQL database

2008-09-18 Thread Minka Stoyanova
Dear Charles, dear list,

As I said, I used your piece of map-file code and made the connection. Now I
try the same but with another shapefile to another table in the same
database, and I receive a segmentation fault of the Apache!

Here follows the code from the map-file:

- this works just fine - the simple layer from the shapefile:

   LAYER # States point layer 1 begins here from the shapefile
NAME "cpoints"
DATA controlpoints_v04
STATUS   ON
TYPE POINT
CLASS
  SYMBOL 'circle'
  SIZE 8
  COLOR 0 0 255
  OUTLINECOLOR 243 255 17
END
  END # States point layer 1 ends here

- this works fine:

LAYER # States point layer 1 begins here
NAME "synoptic_stations"
CONNECTIONTYPE ogr
CONNECTION "../data/ESRI/UTM/synoptic_stations.shp"
DATA "SELECT * FROM synoptic_stations LEFT JOIN
'MYSQL:meteo,host=myhost,user=mysqluseraccount,password=mysqluserpasswd'.bgc
ON synoptic_stations.A = bgc.sin_kod"
STATUS   ON
TYPE POINT
CLASS
  SYMBOL 'circle'
  SIZE 8
  COLOR 255 0 0
  OUTLINECOLOR 0 0 0
END
  END # States point layer 1 ends here

- this fails with a segmentation fault:

LAYER # States point layer 1 begins here
NAME "cpoints"
CONNECTIONTYPE ogr
CONNECTION "../data/ESRI/mt/controlpoints_v04.shp"
DATA "SELECT * FROM controlpoints_v04 LEFT JOIN
'MYSQL:meteo,host=myhost,user=mysqluseraccount,password=mysqluserpasswd'.controlpoint
ON controlpoints_v04.ID=controlpoint.CODENUM"
STATUS   ON
TYPE POINT
CLASS
  SYMBOL 'circle'
  SIZE 8
  COLOR 255 0 0
  OUTLINECOLOR 0 0 0
END
  END # States point layer 1 ends here

So: the database is the same, mysql user and passwd are the same, the
connection is from the same Apache server with the same php mapscript
application. The shapefiles are different and the tables in the database are
different.

Where could be the problem?

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


[mapserver-users] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Paul james
Hello Guys...
I´d like to add a point in a Postgis layer... I´m able to do this using
geomfromtext function (postgis)...
I´d like to do that in C#  ...
Is that possible?

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


Re: [mapserver-users] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Tamas Szekeres
Paul,

You could probably use the GDAL C# bindings and the
Geometry.CreateFromWkt function for this purpose.
For more information see the createdata.cs example in the gdal source tree.

Best regards,

Tamas


2008/9/18 Paul james <[EMAIL PROTECTED]>:
> Hello Guys...
> I´d like to add a point in a Postgis layer... I´m able to do this using
> geomfromtext function (postgis)...
> I´d like to do that in C#  ...
> Is that possible?
>
> Thankz
> ___
> 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] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Paul james
Thanks Thamas...
Thats sounds great...
But, after I used Geometry.CreateFromWkt function to convert my geometry,
how can I add it to the PostGis Layer?

On Thu, Sep 18, 2008 at 12:06 PM, Tamas Szekeres <[EMAIL PROTECTED]>wrote:

> Paul,
>
> You could probably use the GDAL C# bindings and the
> Geometry.CreateFromWkt function for this purpose.
> For more information see the createdata.cs example in the gdal source tree.
>
> Best regards,
>
> Tamas
>
>
> 2008/9/18 Paul james <[EMAIL PROTECTED]>:
>  > Hello Guys...
> > I´d like to add a point in a Postgis layer... I´m able to do this using
> > geomfromtext function (postgis)...
> > I´d like to do that in C#  ...
> > Is that possible?
> >
> > Thankz
> > ___
> > 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] GRID or not to GRID (USNG question)

2008-09-18 Thread Brent Fraser

Bob,

 I get a Username/Password request dialog from the URL...

Brent Fraser

Bob Basques wrote:

All,
 
in the following interface:
 
http://gis.ci.stpaul.mn.us/gis/gismo_public/html/?mapbook=/datasets/CONFIGS/SAINT_PAUL/PUBLIC_WORKS/MAPBOOKS/TS/usng_1st.xml
 
The last two layers in the "US National Grid Layers" folder show a layer 
with lines Easting and Northing, that I want to label.  They label just 
fine, but I would like to align them along an edge of the view 
automatically, the ideal situation would be to have two labels on each  
end of the lines along the edges of the view.
 
We've tried using the GRID object, even going so modifying the source 
for GRID, you can see an example in the third to last layer above, "USNG 
via MapServer GRID" (Wait for it, it's kinda slow right now)  And just 
can't seem to get the output in any sort of usable result for printing.
 
Question, anyone got any ideas about how to align those labels along the 
edges?
 
Thanks
 
bobb
 
 





___
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] Flexible queries (to support address lookups)

2008-09-18 Thread Steve Lime
Like I said, there are other users with far more knowledge in this area... ;-)

Steve

>>> On 9/17/2008 at 2:22 PM, in message <[EMAIL PROTECTED]>, Stephen
Woodbridge <[EMAIL PROTECTED]> wrote:
> This is one approach to the problem, but it does not deal with the real 
> problems of matching user entered addresses with addresses encoded on 
> street segments.
> 
> For example: matching AL 44, Alabama 44, AL-44, Alabama Highway 44, 
> Highway 44, State Highway 44, Rt 44, and various other abbreviations for 
> Highway, simple typo errors, adding N, N., North, S, S., South, etc 
> designations to the Highway, adding Alt., Bus., Byp., etc and on it 
> goes. You also need to deal with accented characters, that are sometimes 
> entered without accents.
> 
> In a geocoder, you typically have a standardizer that sort our all that 
> craziness. Then when you load the geocoder, you standardize the vendor 
> data and store it in a standard form. When you get a geocode request you 
> standardize the incoming request and then try to match the standard form 
> with the vendor data which is also in standard form.
> 
> You can also you techniques like metaphone/soundex codes to do fuzzy 
> searching and then use levensthein distance to score the possible 
> matched results for how close they are to the request.
> 
> You need to be prepared to handle multiple results to a query, for 
> example you search for Oak St. but only find North Oak Street and South 
> Oak Street.
> 
> Also what are you going to search? your whole dataset, or are you also 
> going to want to filter it by City, state, postal code, country. I thins 
> case you also need to be able to parse the full address into al these 
> additional terms. and filter your search to those appropriate to that 
> limited region.
> 
> It makes much more sense, to load the appropriate data records into a 
> relational database and make the queries in SQL. If you do not want to 
> use a full blown database like Postgresql or Mysql, then look at SQLite 
> which is a wonderful embedded database with zero management and had 
> binding for C, Perl, Python, PHP, TCL, etc.
> 
> My two cents, from someone that has his head and fingers in too many 
> geocoders.
> 
> -Steve
>   http://imaptools.com/ 
> 
> Steve Lime wrote:
>> I think we'd need fuzzy match operator, probably one specific to address 
>> matching. This would involve adding a C function(s) to compare to addresses
>> strings and then tweaking the MapServer yacc grammar to recognize the
>> new operator. The trick would obviously to write the C function and there 
> are
>> folks on the list with considerable experience with that problem.
>> 
>> If you HAD that operator then presumably you could write different filters
>> depending on your data, e.g.:
>> 
>>   ('user entered address' addreq '[address column]') or
>>   ('user entered address' addreq '[prefix] [name] [type] [suffix]')
>> 
>> That would be faster than trying to manipulate the current operators. You 
> could
>> also do a very generic query, like a case insensitive lookup on the street 
> name
>> and then operate on that result set in your application to deal with data
>> differences.
>> 
>> Steve
>> 
> "Emerson, Gabe" <[EMAIL PROTECTED]> 09/17/08 10:16 AM >>>
>> Hi All,
>> 
>> I have an interesting mini-project which some of you might have dealt
>> with before, I'd be interested in any suggestions. 
>> 
>> I'd like to run a query (presented to users as an address search),
>> across multiple layers. For example, after an address is entered, the
>> system first searches an in-house dataset, if there are no matches it
>> searches a county parcel dataset, and if both fail, it tries to map the
>> address via a geocoding API.
>>  
>> The issue I'm running into is that each of the layers stores addresses a
>> little differently. The in-house set tends to be sloppy about
>> punctuation and things like directions ('N' vs 'North', 'St' vs 'ST.' vs
>> 'Street',  etc).  The county is more standardized but breaks everything
>> up into street prefix, name, type, suffix, etc. (Minnesota Met Council,
>> for those of you familiar with it). In addition, users tend not to enter
>> addresses the same way twice, and to leave out things like the street
>> type and direction.
>> 
>> I'm wondering if there's a way to relax the query matches so that
>> something like "100 James" will return a match from a DBF containing
>> "100 South James Ave", or a set of columns like "100" "S" "James" "Ave".
>> Something along the lines of  The Geocoding API is flexible in this way,
>> so one solution I considered is to use it as an address parser and then
>> use  the returned X,Y data for an itemquery on each of the layers. The
>> problems with that are slower performance  and possible API
>> unavailability. 
>> 
>> Currently I'm using Mapserver in CGI mode with some Javascript for
>> frontend logic and custom tools. I developed the application this way
>> for various reasons, but am considerin

Re: [mapserver-users] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Paul Ramsey
Connect to the database and run

INSERT INTO mytable (the_geom) VALUES
(ST_SetSRID(ST_GeometryFromText('blahblah'),));

P.

On Thu, Sep 18, 2008 at 8:43 AM, Paul james <[EMAIL PROTECTED]> wrote:
> Thanks Thamas...
> Thats sounds great...
> But, after I used Geometry.CreateFromWkt function to convert my geometry,
> how can I add it to the PostGis Layer?
>
> On Thu, Sep 18, 2008 at 12:06 PM, Tamas Szekeres <[EMAIL PROTECTED]>
> wrote:
>>
>> Paul,
>>
>> You could probably use the GDAL C# bindings and the
>> Geometry.CreateFromWkt function for this purpose.
>> For more information see the createdata.cs example in the gdal source
>> tree.
>>
>> Best regards,
>>
>> Tamas
>>
>>
>> 2008/9/18 Paul james <[EMAIL PROTECTED]>:
>> > Hello Guys...
>> > I´d like to add a point in a Postgis layer... I´m able to do this using
>> > geomfromtext function (postgis)...
>> > I´d like to do that in C#  ...
>> > Is that possible?
>> >
>> > Thankz
>> > ___
>> > mapserver-users mailing list
>> > mapserver-users@lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >
>> >
>
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] GRID or not to GRID (USNG question)

2008-09-18 Thread Bob Basques
Brent,
 
I figured out the publishing problem (my error) for the Web Interface.  This 
link should work now:
 
http://gis.ci.stpaul.mn.us/gis/gismo_public/html/?mapbook=/datasets/CONFIGS/SAINT_PAUL/PUBLIC_WORKS/MAPBOOKS/TS/usng_1st_public.xml
 
 
It will give you a better idea of the labeling problems at different scales of 
view that I'm running into.
 
We actually did some code change in MapServer to get to the point of even 
coming close to the USNG formats, but it still comes up short.
 
Thanks
 
bobb
 


>>> Brent Fraser <[EMAIL PROTECTED]> wrote:
Bob,

  I seem to remember experimenting with different LABEL -> POSITION settings in 
the GRID layer.  I'll try to find my map file.

Brent

Bob Basques wrote:
> Brent,
>  
> Sorry about that, I really need to get a test box for outside posting of 
> things.  :c)
>  
> Here is a screenshot about what I'm talking about:
>  
>  
> Basically I want to align the labels along the edges.  I've tried a few 
> different things to fake it with some positive results, But nothing that 
> I can implement as a production piece because it needs some sort of 
> manual intervention in the final process.
>  
> The entities are predefined lines as a SHP file that I'm labeling. Now 
> using the MapServer Grid Object I got this far:
>  
>  
> But even this is not getting me to the final destination.  There's not 
> much control on numbering and the process is fairly slow compared to 
> just labeling the lines.
>  
> Any ideas?
>  
> bobb
>  
> 
> 
>> >> Brent Fraser <[EMAIL PROTECTED]> wrote:
> Bob,
> 
>   I get a Username/Password request dialog from the URL...
> 
> Brent Fraser
> 
> Bob Basques wrote:
>>  All,
>> 
>>  in the following interface:
>> 
>> 
> http://gis.ci.stpaul.mn.us/gis/gismo_public/html/?mapbook=/datasets/CONFIGS/SAINT_PAUL/PUBLIC_WORKS/MAPBOOKS/TS/usng_1st.xml
>  
>> 
>>  The last two layers in the "US National Grid Layers" folder show a layer
>>  with lines Easting and Northing, that I want to label.  They label just
>>  fine, but I would like to align them along an edge of the view
>>  automatically, the ideal situation would be to have two labels on each 
>>  end of the lines along the edges of the view.
>> 
>>  We've tried using the GRID object, even going so modifying the source
>>  for GRID, you can see an example in the third to last layer above, "USNG
>>  via MapServer GRID" (Wait for it, it's kinda slow right now)  And just
>>  can't seem to get the output in any sort of usable result for printing.
>> 
>>  Question, anyone got any ideas about how to align those labels along the
>>  edges?
>> 
>>  Thanks
>> 
>>  bobb
>> 
>> 
>>
>>
>>  
>>
>>  ___
>>  mapserver-users mailing list
>>  mapserver-users@lists.osgeo.org 
>>  http://lists.osgeo.org/mailman/listinfo/mapserver-users 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Paul james
Thanks ...

But what I need now is manipulate the geometry values in c#...
I got a point from postgis in this format :
01010059405940
I cant use AsText postgis function...

So, in my server(c#) I have to Convert that "numbers" to Point to change it
...
Any help?

On Thu, Sep 18, 2008 at 1:13 PM, Paul Ramsey <[EMAIL PROTECTED]>wrote:

> Connect to the database and run
>
> INSERT INTO mytable (the_geom) VALUES
> (ST_SetSRID(ST_GeometryFromText('blahblah'),));
>
> P.
>
> On Thu, Sep 18, 2008 at 8:43 AM, Paul james <[EMAIL PROTECTED]> wrote:
> > Thanks Thamas...
> > Thats sounds great...
> > But, after I used Geometry.CreateFromWkt function to convert my geometry,
> > how can I add it to the PostGis Layer?
> >
> > On Thu, Sep 18, 2008 at 12:06 PM, Tamas Szekeres <[EMAIL PROTECTED]>
> > wrote:
> >>
> >> Paul,
> >>
> >> You could probably use the GDAL C# bindings and the
> >> Geometry.CreateFromWkt function for this purpose.
> >> For more information see the createdata.cs example in the gdal source
> >> tree.
> >>
> >> Best regards,
> >>
> >> Tamas
> >>
> >>
> >> 2008/9/18 Paul james <[EMAIL PROTECTED]>:
> >> > Hello Guys...
> >> > I´d like to add a point in a Postgis layer... I´m able to do this
> using
> >> > geomfromtext function (postgis)...
> >> > I´d like to do that in C#  ...
> >> > Is that possible?
> >> >
> >> > Thankz
> >> > ___
> >> > mapserver-users mailing list
> >> > mapserver-users@lists.osgeo.org
> >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >> >
> >> >
> >
> >
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Using Fast CGI with MapServer to alleviate poor performance

2008-09-18 Thread John Westwood
Hi Paul,

Thanks for the tips, I forgot about trying from the command line and the apache 
log :) Anyway, I found out the problem was to do with libpq.so.4 (which is a 
Postgres library) not being found. My colleague had upgraded Postgres, so it 
wasn't me that broke MapServer afterall !

The new libpq library is libpq.so.5. Recompiling MapServer did not solve the 
problem, so I just symlinked libpq.so.4 to libpq.so.5 . Problem solved.

Now to track down the performance issues!

Thanks,

John



>>> "Paul Ramsey" <[EMAIL PROTECTED]> 18/09/08 1:09 AM >>>
Pull out your command-line, you probably have a linking library
problem, and mapserv is just dying unceremoniously.

So first: can you just run "mapserv" on the command line. If not,
what's the error? is it instructive?
Second, if just a plain "mapserv" runs, what happens when you feed it
your workload? the trick is to use the mysterious "QUERY_STRING"
commandline parameter, thusly:

./mapserv "QUERY_STRING=map=/your/map.map&layers=yourlayers&etc"

This runs mapserv in pretend CGI mode, without having a web server in
the way, very handy for debugging.

P.

PS - I just realized, usually you can see the error in the apache
error_log, skipping all this tedious command-line stuff.


On Wed, Sep 17, 2008 at 3:00 PM, John Westwood <[EMAIL PROTECTED]> wrote:
> Hi Paul,
>
> Thanks for the useful information. The performance is pretty terrible, so I 
> will have to do some more investigating. The MapServer executable almost 
> completely maxes out two cores and it can take 30 seconds or more to fetch 
> all the tiles for a particular view. I do connect to Postgres to fetch map 
> metadata and I pull the info from MapServer using WFS. Perhaps this is 
> causing a problem.
>
> One large problem. I tried going back to my old MapServer without the FastCGI 
> and I commented out my MapServer configuration lines in the mod_fcgid.conf 
> file (and restarted the server). Unfortunately, this too now no longer works 
> and gives the same error:
>
> The server encountered an internal error and was unable to complete your 
> request
> Error message: Premature end of script headers: mapserv
>
> I really need to fix this! Aarg!
>
> Thanks,
>
> John
>
>
 "Paul Ramsey" <[EMAIL PROTECTED]> 17/09/08 5:15 PM >>>
> John,
>
> The idea that CGI is naturally a much slower situation than a
> long-running process is a bit of a red herring in the case of
> Mapserver, and I say that as someone who is anal retentive about these
> things.  Unless your Mapserver installation has some naturally latent
> components (database connections, primarily) you'll find that moving
> from CGI to FastCGI is worth about 15ms per request.
>
> On Wed, Sep 17, 2008 at 8:40 AM, John Westwood <[EMAIL PROTECTED]> wrote:
>
>> The reason I am trying to get MapServer to work with fast_cgi is because I 
>> am experiencing poor performance with OpenLayers. I believe that OpenLayers 
>> starts a new MapServer instance for each tile request, thus causing an 
>> unnecessary overhead. Am I correct?
>
> Yes and no. If you are experiencing noticeably poor performance (you
> can actually *see* it being slow) the only place that the CGI overhead
> could be the cause is if you're connecting to Oracle or SDE for some
> of your layers. If that's not the case, look elsewhere first, the very
> small gains you will receive from moving to FastCGI will not change
> your underlying problem.
>
> Paul
>
>

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


[mapserver-users] Mapserver (CGI/FastCGI) crashes when querying a map

2008-09-18 Thread Carlos Ruiz
Hi list,

I have Mapserver 5.0.2 installed on Win32, when I do some queries to my map, 
the response 
takes so long and then a window appears saying that CGI/FastCGI crashes. Can 
someone 
have some idea why the hell is crashing ?

Thanks in advance

IC Carlos Ruiz


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


Re: [mapserver-users] Mapserver (CGI/FastCGI) crashes when querying amap

2008-09-18 Thread Steve Lime
You're going to have to be more specific what the hell you're trying to do. ;-)

>>> On 9/18/2008 at 1:43 PM, in message
<[EMAIL PROTECTED]>, Carlos Ruiz
<[EMAIL PROTECTED]> wrote:
> Hi list,
> 
> I have Mapserver 5.0.2 installed on Win32, when I do some queries to my map, 
> the response 
> takes so long and then a window appears saying that CGI/FastCGI crashes. Can 
> someone 
> have some idea why the hell is crashing ?
> 
> Thanks in advance
> 
> IC Carlos Ruiz
> 
> 
>   

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


Re: [mapserver-users] Using Fast CGI with MapServer to alleviate poor performance

2008-09-18 Thread John Westwood
Hi Paul and other MapServer Gurus,

I have discovered a huge speed increase by using OpenLayers.MapServer (native) 
layers instead of OpenLayers.WMS layers. It is about ten times faster, I do not 
exaggerate. Why is WMS so slow? I have read that MapServer is a fast WMS 
server, have I done something wrong for it not to be?

What do you think could be the problem?

I will give it some thought tomorrow.

John




>>> "Paul Ramsey" <[EMAIL PROTECTED]> 17/09/08 5:15 PM >>>
John,

The idea that CGI is naturally a much slower situation than a
long-running process is a bit of a red herring in the case of
Mapserver, and I say that as someone who is anal retentive about these
things.  Unless your Mapserver installation has some naturally latent
components (database connections, primarily) you'll find that moving
from CGI to FastCGI is worth about 15ms per request.

On Wed, Sep 17, 2008 at 8:40 AM, John Westwood <[EMAIL PROTECTED]> wrote:

> The reason I am trying to get MapServer to work with fast_cgi is because I am 
> experiencing poor performance with OpenLayers. I believe that OpenLayers 
> starts a new MapServer instance for each tile request, thus causing an 
> unnecessary overhead. Am I correct?

Yes and no. If you are experiencing noticeably poor performance (you
can actually *see* it being slow) the only place that the CGI overhead
could be the cause is if you're connecting to Oracle or SDE for some
of your layers. If that's not the case, look elsewhere first, the very
small gains you will receive from moving to FastCGI will not change
your underlying problem.

Paul

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


Re: [mapserver-users] Using Fast CGI with MapServer to alleviate poor performance

2008-09-18 Thread John Westwood
Okay, maybe not ten times faster - but at least five times as fast - if not 
more. Anyway, ALOT faster than WMS :)



>>> "Paul Ramsey" <[EMAIL PROTECTED]> 17/09/08 5:15 PM >>>
John,

The idea that CGI is naturally a much slower situation than a
long-running process is a bit of a red herring in the case of
Mapserver, and I say that as someone who is anal retentive about these
things.  Unless your Mapserver installation has some naturally latent
components (database connections, primarily) you'll find that moving
from CGI to FastCGI is worth about 15ms per request.

On Wed, Sep 17, 2008 at 8:40 AM, John Westwood <[EMAIL PROTECTED]> wrote:

> The reason I am trying to get MapServer to work with fast_cgi is because I am 
> experiencing poor performance with OpenLayers. I believe that OpenLayers 
> starts a new MapServer instance for each tile request, thus causing an 
> unnecessary overhead. Am I correct?

Yes and no. If you are experiencing noticeably poor performance (you
can actually *see* it being slow) the only place that the CGI overhead
could be the cause is if you're connecting to Oracle or SDE for some
of your layers. If that's not the case, look elsewhere first, the very
small gains you will receive from moving to FastCGI will not change
your underlying problem.

Paul

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


Re: [mapserver-users] Using Fast CGI with MapServer to alleviate poor performance

2008-09-18 Thread Stephen Woodbridge

John Westwood wrote:

Hi Paul and other MapServer Gurus,

I have discovered a huge speed increase by using OpenLayers.MapServer
(native) layers instead of OpenLayers.WMS layers. It is about ten
times faster, I do not exaggerate. Why is WMS so slow? I have read
that MapServer is a fast WMS server, have I done something wrong for
it not to be?

What do you think could be the problem?


You might want to check that you are comparing apples and apples. I 
would expect WMS to be a little slower because there is some overhead to 
query the server before actually making the image request.


Do you have ratio set the same for both layers?
What versions of Mapserver and OpenLayers are you using?

Can you post a URL that has the two layers present in the layer switch 
so we can look at the requests and how your have it configured? Or post 
the HTML so we can look at. In fact you might want to post the HTML to 
the openlayers list and as the question there first, to make sure you 
have equivalent requests between WNS and Mapserver.


-Steve W


I will give it some thought tomorrow.

John





"Paul Ramsey" <[EMAIL PROTECTED]> 17/09/08 5:15 PM >>>

John,

The idea that CGI is naturally a much slower situation than a 
long-running process is a bit of a red herring in the case of 
Mapserver, and I say that as someone who is anal retentive about

these things.  Unless your Mapserver installation has some naturally
latent components (database connections, primarily) you'll find that
moving from CGI to FastCGI is worth about 15ms per request.

On Wed, Sep 17, 2008 at 8:40 AM, John Westwood
<[EMAIL PROTECTED]> wrote:


The reason I am trying to get MapServer to work with fast_cgi is
because I am experiencing poor performance with OpenLayers. I
believe that OpenLayers starts a new MapServer instance for each
tile request, thus causing an unnecessary overhead. Am I correct?


Yes and no. If you are experiencing noticeably poor performance (you 
can actually *see* it being slow) the only place that the CGI

overhead could be the cause is if you're connecting to Oracle or SDE
for some of your layers. If that's not the case, look elsewhere
first, the very small gains you will receive from moving to FastCGI
will not change your underlying problem.

Paul

___ 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] Using Fast CGI with MapServer toalleviate poor performance

2008-09-18 Thread Steve Lime
MapServer WMS is just a wrapper around the CGI so they should be very close in 
speed. It would be interesting
to capture actual calls made by OpenLayers and then debug independently.

Steve

>>> On 9/18/2008 at 2:59 PM, in message
<[EMAIL PROTECTED]>, "John Westwood"
<[EMAIL PROTECTED]> wrote:
> Hi Paul and other MapServer Gurus,
> 
> I have discovered a huge speed increase by using OpenLayers.MapServer 
> (native) layers instead of OpenLayers.WMS layers. It is about ten times 
> faster, I do not exaggerate. Why is WMS so slow? I have read that MapServer 
> is a fast WMS server, have I done something wrong for it not to be?
> 
> What do you think could be the problem?
> 
> I will give it some thought tomorrow.
> 
> John
> 
> 
> 
> 
 "Paul Ramsey" <[EMAIL PROTECTED]> 17/09/08 5:15 PM >>>
> John,
> 
> The idea that CGI is naturally a much slower situation than a
> long-running process is a bit of a red herring in the case of
> Mapserver, and I say that as someone who is anal retentive about these
> things.  Unless your Mapserver installation has some naturally latent
> components (database connections, primarily) you'll find that moving
> from CGI to FastCGI is worth about 15ms per request.
> 
> On Wed, Sep 17, 2008 at 8:40 AM, John Westwood <[EMAIL PROTECTED]> 
> wrote:
> 
>> The reason I am trying to get MapServer to work with fast_cgi is because I 
> am experiencing poor performance with OpenLayers. I believe that OpenLayers 
> starts a new MapServer instance for each tile request, thus causing an 
> unnecessary overhead. Am I correct?
> 
> Yes and no. If you are experiencing noticeably poor performance (you
> can actually *see* it being slow) the only place that the CGI overhead
> could be the cause is if you're connecting to Oracle or SDE for some
> of your layers. If that's not the case, look elsewhere first, the very
> small gains you will receive from moving to FastCGI will not change
> your underlying problem.
> 
> Paul
> 
> ___
> 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] Using Fast CGI with MapServer to alleviate poor performance

2008-09-18 Thread Christopher Schmidt
On Thu, Sep 18, 2008 at 08:59:51PM +0100, John Westwood wrote:
> Hi Paul and other MapServer Gurus,
> 
> I have discovered a huge speed increase by using OpenLayers.MapServer 
> (native) layers instead of OpenLayers.WMS layers. It is about ten times 
> faster, I do not exaggerate. Why is WMS so slow? I have read that MapServer 
> is a fast WMS server, have I done something wrong for it not to be?
> 
> What do you think could be the problem?
> 
> I will give it some thought tomorrow.

Is it possible the difference is 'projections'?

The Layer.MapServer in OpenLayers does not include any projection
information, so if you have your OpenLayers Map configured in a way that
would (via WMS) cause MapServer to reproject on the fly, it will have
significantly different performance. (There are other side effects if
your projections are actually different, but they might not be noticable
at a first pass.)

I agree with Steve that it probably makes sense to generate:

 * A WMS-served URL
 * A MapServer-served URL
 * Your mapfile configuration

Those three things will probably help point towards the misconfiguration
in your current setup.

Regards,
-- 
Christopher Schmidt
MetaCarta
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Tamas Szekeres
Paul,

You should probably do the following steps when creating a new layer
from scratch:

// Register OGR

Ogr.RegisterAll();

// Get the postgis driver
Driver drv = Ogr.GetDriverByName("PostgreSQL");

// Create the datasource
DataSource ds = drv.CreateDataSource( [data source name], new string[] {} );

// Create the layer
Layer layer = ds.CreateLayer( [layer name], null,
wkbGeometryType.wkbPoint, new string[] {} );

// Adding attribute fields to the layers if needed
FieldDefn fdefn = new FieldDefn( "Name", FieldType.OFTString );
fdefn.SetWidth(32);
layer.CreateField( fdefn, 1 ) ;

// Adding features to the layer
Feature feature = new Feature( layer.GetLayerDefn() );
feature.SetField( "Name", "value" );
Geometry geom = Geometry.CreateFromWkt("POINT(47.0 19.2)");
feature.SetGeometry( geom );
layer.CreateFeature( feature );


Best regards,

Tamas



2008/9/18 Paul james <[EMAIL PROTECTED]>:
> Thanks Thamas...
> Thats sounds great...
> But, after I used Geometry.CreateFromWkt function to convert my geometry,
> how can I add it to the PostGis Layer?
>
> On Thu, Sep 18, 2008 at 12:06 PM, Tamas Szekeres <[EMAIL PROTECTED]>
> wrote:
>>
>> Paul,
>>
>> You could probably use the GDAL C# bindings and the
>> Geometry.CreateFromWkt function for this purpose.
>> For more information see the createdata.cs example in the gdal source
>> tree.
>>
>> Best regards,
>>
>> Tamas
>>
>>
>> 2008/9/18 Paul james <[EMAIL PROTECTED]>:
>> > Hello Guys...
>> > I´d like to add a point in a Postgis layer... I´m able to do this using
>> > geomfromtext function (postgis)...
>> > I´d like to do that in C#  ...
>> > Is that possible?
>> >
>> > Thankz
>> > ___
>> > 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] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Tamas Szekeres
2008/9/18 Paul james <[EMAIL PROTECTED]>:

> I got a point from postgis in this format :
> 01010059405940

It smells like a wkt geometry representation in hexstring format. You
should convert this into a binary array and then use
Geometry.CreateFromWkb, something like (untested):

// allocate byte array based on half of string length
byte[] bytes = new byte[(strInput.Length) / 2];
// loop through the string - 2 bytes at a time converting it to
decimal equivalent and store in byte array
int i = 0, x= 0;
while (strInput.Length > i + 1)
{
long lngDecimal = Convert.ToInt32(strInput.Substring(i, 2), 16);
bytes[x] = Convert.ToByte(lngDecimal);
i = i + 2;
++x;
}
Geometry geom = Geometry.CreateFromWkb(bytes);


I wonder if there is some support to this kind of string conversion in
the .NET FW class library (something like the BitConverter class) that
I'm not aware of. Let me know if you can do it easier.

Best regards,

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


Re: [mapserver-users] geomfromtext (POSTGIS) in C# or other language...

2008-09-18 Thread Tamas Szekeres
or wkb (Well-Known Binary) what I wanted to say ;-)

http://dev.mysql.com/doc/refman/5.0/en/gis-wkb-format.html

Tamas


2008/9/18 Tamas Szekeres <[EMAIL PROTECTED]>:
> 2008/9/18 Paul james <[EMAIL PROTECTED]>:
>
>> I got a point from postgis in this format :
>> 01010059405940
>
> It smells like a wkt geometry representation in hexstring format. You
> should convert this into a binary array and then use
> Geometry.CreateFromWkb, something like (untested):
>
> // allocate byte array based on half of string length
> byte[] bytes = new byte[(strInput.Length) / 2];
> // loop through the string - 2 bytes at a time converting it to
> decimal equivalent and store in byte array
> int i = 0, x= 0;
> while (strInput.Length > i + 1)
> {
>long lngDecimal = Convert.ToInt32(strInput.Substring(i, 2), 16);
>bytes[x] = Convert.ToByte(lngDecimal);
>i = i + 2;
>++x;
> }
> Geometry geom = Geometry.CreateFromWkb(bytes);
>
>
> I wonder if there is some support to this kind of string conversion in
> the .NET FW class library (something like the BitConverter class) that
> I'm not aware of. Let me know if you can do it easier.
>
> Best regards,
>
> Tamas
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users