maps.google.com - Speed
Shanton, James A
James.Shanton2 at NSCORP.COM
Tue Apr 12 05:21:28 PDT 2005
We're using a SQL Server DB, and OGR to access the coordinates to plot our
items. Listed below is the info out of the connection file. Is this
similar / comparable in speed to a PostGIS database ?
Are there any ways I can speed this up ? We have indexes on the activity,
ag_latitude, and ag_longitude columns.
I'm also displaying the activity on the map with different colors, by using
classitem "atvstatus" listed in the mapfile section below.
Thanks !
Jim
-------------------------------------- ovf File (Db Connection) --------
<OGRVRTDataSource>
<OGRVRTLayer name="actsogrl">
<SrcDataSource>ODBC:myuid/mypwd at mydevDB</SrcDataSource>
<SrcLayer>idsites</SrcLayer>
<SrcSQL>select
activity,rspprty,atvtype,customer,agreement,atvstatus,milepost,ag_latitude
as y,ag_longitude as x,image_file from re_activity_coordinates where atvType
not like '%signboard%'</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="x" y="y"/>
</OGRVRTLayer>
</OGRVRTDataSource>
-------------------------------------------- Map File Section Below ------
LAYER
NAME "acts"
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "ogrActs.ovf" # the name and path to the virtual.ovf file,
relative to shapepath may work?
DATA "actsogrl" # the name of the OGRVrtLayer
STATUS OFF
SYMBOLSCALE 50000
DUMP TRUE
TOLERANCE 30
LABELITEM activity #may need to use table.name or just name depending on
your OVF file.
CLASSITEM "atvstatus" # value to be compared to EXPRESSION
CLASS #activities
NAME "Completed Activities" # will show up in index this way
EXPRESSION 'Completed' # String to compare to Attribute column
SYMBOL 'circle'
SIZE 7
MINSIZE 2
MAXSIZE 20
COLOR 255 0 0
OVERLAYSYMBOL 'circle'
OVERLAYSIZE 1
OVERLAYCOLOR 255 0 0
LABEL
type truetype
FONT ARIAL-BOLD
maxsize 10
minsize 6
COLOR 0 0 0
OUTLINECOLOR 255 255 255
END # end label
END
CLASS #Active activities -- Lime Green
NAME "Active Activities" # will show up in index this way
EXPRESSION 'Active' # String to compare to Attribute column
SYMBOL 'circle'
SIZE 7
MINSIZE 2
MAXSIZE 20
COLOR 0 255 0
OVERLAYSYMBOL 'circle'
OVERLAYSIZE 1
OVERLAYCOLOR 0 255 0
LABEL
type truetype
FONT ARIAL-BOLD
maxsize 10
minsize 6
COLOR 0 0 0
OUTLINECOLOR 255 255 255
END # end label
END
CLASS #Canceled activities -- BLack
NAME "Canceled Activities" # will show up in index this way
EXPRESSION 'Active' # String to compare to Attribute column
SYMBOL 'circle'
SIZE 7
MINSIZE 2
MAXSIZE 20
COLOR 0 0 0
OVERLAYSYMBOL 'circle'
OVERLAYSIZE 1
OVERLAYCOLOR 0 0 0
LABEL
type truetype
FONT ARIAL-BOLD
maxsize 10
minsize 6
COLOR 0 0 0
OUTLINECOLOR 255 255 255
END # end label
END
CLASS #Other activities - Blue
NAME "Other Activities" # will show up in index this way
EXPRESSION 'Other' # String to compare to Attribute column
SYMBOL 'circle'
SIZE 7
MINSIZE 2
MAXSIZE 20
COLOR 0 0 255
OVERLAYSYMBOL 'circle'
OVERLAYSIZE 1
OVERLAYCOLOR 0 0 255
LABEL
type truetype
FONT ARIAL-BOLD
maxsize 10
minsize 6
COLOR 0 0 0
OUTLINECOLOR 255 255 255
END # end label
END
END
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Gregor Mosheh
Sent: Monday, April 11, 2005 7:24 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] maps.google.com - Speed
--- "Shanton, James A" <James.Shanton2 at NSCORP.COM>
wrote:
> Is there anyway to speed this system up like
> maps.google.com ? I'm having
> speed issues displaying my database layers.
I presume you mean PostGIS tables. For starters, make
sure you have the appropriate indexes created on your
PostGIS table. There are basicallly three indexes to
consider:
- an index on the oid column. this is used internally
by MapServer and PostGIS and makes a HUGE difference.
- a GIST index on the geometry column (probably called
the_geom) is obviously useful, and makes a huge
difference.
- if your layer uses a FILTER to select only certain
records, make sure those columns have indexes
I hope that helps.
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
More information about the MapServer-users
mailing list