Re: [mapserver-users] Displaying Huge Data on Mapserver

2009-08-19 Thread Simon Haddon
I have had a postgresql / postgis database with over 120 million rows of 
point data in a single table and I have been amazed about how well 
postgresql performs.  As long as you get your indexes and queries right 
then I would recommend that option for point data.


Cheers,
Simon

Frank Warmerdam wrote:

Rishikant Lal wrote:

Dear Friends,
I need some help. I have a Point Feature Layer that I want to display 
on Map Server. The layer has Nearly Ten Million Point Features.


Rishikant,

This is not a terribly large database though it is certainly large enough
that care must be taken in how it is accessed.


What kind of Data Base should I use?
Will Post GIS support this kind of Data?
What are the steps I should use to speed up the Map Display Process?


You should be able to achieve good performance with tile indexed 
shapefiles

with indexes on the individual shapefiles and the tileindex.  Some
experimentation might be required to find an optimal breakdown.  You 
could

*try* it in one big shapefile with a spatial index but I have some doubts
about whether this would give ideal performance.

This dataset could also be well handled in PostGIS with a spatial index
on the geometry column of course.

A lot depends on what you want to do with this dataset of course.  I'm 
assuming
you want to render maps of very local regions with only a few 
thousands of
points.  Rendering points as symbols or labels can be expensive so we 
wary

of trying to render too many on a map.

Best regards,


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


Re: [mapserver-users] Mapserver/PostGIS map file problem (double quotes in layer 'DATA' element)

2009-05-27 Thread Simon Haddon
Thanks, Now I just need that chest.  lol

On Wed, 27 May 2009 16:29:54 -0700, Peter Willis 
wrote:
> Hello,
> 
> Darn!, I just sent a [RESOLVED] with the same solution.
> (just as I was receiving your email...)
> Yes, this is how I managed to to make it work.
> 
> Everything works now.
> I guess you get the badge for that one.
> 
> Thanks for your help.
> 
> Peter
> 
> 
> 
> Simon Haddon wrote:
>> Have you tried
>> 
>> DATA 'the_geom from (select oid,gid, the_geom,
>>  "Area","Perimeter","PixelValue" FROM "global_Land_poly" WHERE
>> "PixelValue"=1 )
>>  AS FOO using SRID=4326'
>> 
>> The other options is to change the table name and column names to be
>> lower
>> case or case insensitive. Mixed case table and column names are always a
>> pain in any database system.
>> 
>> If you can't modify the table then try creating a view and using the
view
>> in your query instead. Make sure your view is created all lower case
>> without quotes.  This will probably mean you will need to alias your
>> select
>> to lower case the column names and you will probably have to add it to
>> the
>> postgis geometry tables manually but other than that it will work.
>> 
>> Cheers,
>> Simon
>>

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


Re: [mapserver-users] Mapserver/PostGIS map file problem (double quotes in layer 'DATA' element)

2009-05-27 Thread Simon Haddon
Have you tried

DATA 'the_geom from (select oid,gid, the_geom,
 "Area","Perimeter","PixelValue" FROM "global_Land_poly" WHERE
"PixelValue"=1 )
 AS FOO using SRID=4326'

The other options is to change the table name and column names to be lower
case or case insensitive. Mixed case table and column names are always a
pain in any database system.

If you can't modify the table then try creating a view and using the view
in your query instead. Make sure your view is created all lower case
without quotes.  This will probably mean you will need to alias your select
to lower case the column names and you will probably have to add it to the
postgis geometry tables manually but other than that it will work.

Cheers,
Simon

On Wed, 27 May 2009 16:00:24 -0700, Peter Willis 
wrote:
> I tried that. I get the following error:
> 
> loadLayer(): Unknown identifier. Parsing error near (Area):(line 30)
> 
> Mapserver doesn't appear to like the additional formatting.
> Do I need to recompile with system regex I wonder?
> 
> Peter
> 
> 
> Adam Eskreis wrote:
>> You could try regex
>> 
>> \"Area\"
>> 
>> -Adam
>> 
>> On Wed, May 27, 2009 at 6:48 PM, Peter Willis > > wrote:
>> 
>> 
>> Hello,
>> 
>> I am having a problem serving a PostGIS layer via mapserver
>> as WFS.
>> 
>> The problem arises from the generation/use of column names
>> in PostgreSQL that require double quotes.
>> 
>> ie:
>> 
>>  SELECT oid,gid, the_geom, "Area","Perimeter","PixelValue" FROM
>> global_Land_poly WHERE "PixelValue"=1;
>> 
>> 
>> 
>> In the map file the 'DATA' member of the PostGIS layer is defined
as:
>> 
>> DATA "the_geom from (select oid,gid, the_geom,
>> Area,Perimeter,PixelValue FROM global_Land_poly WHERE PixelValue=1 )
>> AS FOO using SRID=4326"
>> 
>> 
>> Mapserver relays a PostGIS error from PostgreSQL:
>> 'ERROR:  column "area" does not exist...
>> 
>> This is because the column name is actually "Area"
>> and requires quotes.
>> 
>> How do I define double quotes in my PostGIS query
>> within the 'DATA' element of my mapfile layer?
>> 
>> Thanks for any enlightenment,
>> 
>> Peter
>> ___
>> 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

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


Re: [mapserver-users] Finding Lat-Long from geometric data type of postgre

2009-05-20 Thread Simon Haddon


Hi, 

I use a combination of server code and Javascript. 

I convert the lat long values to a javascript array which is loaded into a
2 dimensional array. This data is then loaded with the map which is quick
if your polygons are not too complicated. 

I then have a mouse over ont he map which checks as the mouse moves to see
if is within the polygon. Since I am already creating lat/long values from
the mouse over I just need to do a simple point in polygon check and I am
there. 

The other way I have thought is to create a html map using the polygon
values that come back but I haven't done that. 

To display the tooltip I use js_graphics (http://www.walterzorn.com/)
library of tools which I find fantastic. 

Cheers, 

Simon 

On Wed, 20 May 2009 01:54:23 -0700, Mukul Gupta  wrote:  

Hi,
I want to display a tool tip for the polygons in my application for which
I need lat-long values of polygon. Please tell me how to retrieve the
values from geometry type field of postgre or If
there is any other way of
doing this.

Regards
Mukul  

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