[mapserver-users] Re: Shape File not appearing

2012-01-16 Thread knasia
I still have the same problem, but now I have mapfile working (I have it
generated by QGIS).
It looks like:
# Map file created from QGIS project file C:/Documents and
Settings/Katarzyna/Pulpit/ver 17/projekt/graf.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)

MAP
  NAME ruch
  # Map image size
  SIZE 256 256
  UNITS dd

  EXTENT 19.735012 49.941251 20.114223 50.170585
  FONTSET './fonts/fonts.list'
  SYMBOLSET './symbols/symbols.sym'
  SHAPEPATH pathxxx/shapes/
  PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 255 255 255
  IMAGEQUALITY 95
  IMAGETYPE png

  OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/png'
IMAGEMODE RGBA
EXTENSION 'png'
  END
  # Legend
  LEGEND
  IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
  TYPE BITMAP
  SIZE MEDIUM
  COLOR 0 0 89
END
  END

  # Web interface definition. Only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/tmp/'

# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'
TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
  END

  LAYER
NAME 'krakowGraf'
TYPE LINE
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT 19.735012 49.941251 20.114223 50.170585
DATA 'krakowGraf.shp'
METADATA
  'ows_title' 'krakowGraf'
END
STATUS OFF
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
CLASS
   NAME 'krakowGraf' 
   STYLE
 WIDTH 0.91 
 COLOR 191 45 220
   END
END
  END

END

When i try to access it from browser as
http://mypath/cgi-bin/mapserv?map=/home/mapy/Mapy-mapserver/baseMaps.maplayers=allmode=mapbogus=1326701290954
it works- my layer is drawn.
Now I want to put this layer on the google maps base.
I have tried:
var urlTemplate = '/cgi-bin/mapserv?';
urlTemplate += 'map=/home/mapy/Mapy-mapserver/baseMaps.map';
urlTemplate += 'layers=';
urlTemplate += 'all';
urlTemplate += '';
urlTemplate += 'mode=map';
baseMapsLayer1a = new GTileLayer(null,0,13,{
tileUrlTemplate:urlTemplate,
isPng:true,
opacity:1.0 });
baseMapsLayer1b=new GTileLayerOverlay(baseMapsLayer1a);
map.addOverlay(pointsLayer1b);
but none of data appeared.


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Shape-File-not-appearing-tp6896942p7191824.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] Re: Shape File not appearing

2011-12-19 Thread knasia
I have the same problem.
Does anyone know how to solve it?

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Shape-File-not-appearing-tp6896942p7108442.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] Re: Shape File not appearing

2011-12-19 Thread knasia
My mapfile generates tile which is empty (white).

My mapfile contains a code which is beneath:

MAP
 NAME name  
 STATUS ON
 OUTPUTFORMAT
  NAME png
  DRIVER GD/PNG
  MIMETYPE image/png
  TRANSPARENT ON
  IMAGEMODE RGB
  EXTENSION png
 END
 SIZE 256 256
 EXTENT -97.238976 41.619778 -82.122902 49.385620
UNITS METERS
SHAPEPATH /pathToShapes/shapes/

 WEB
 TEMPLATE myPage.php
IMAGEPATH /path/
IMAGEURL validURL
  END

  QUERYMAP
  SIZE 256 256
  STATUS ON
  STYLE HILITE
  COLOR 255 0 0
 END

LAYER
NAME map1
PROJECTION
init=epsg:4326
END
TYPE LINE
STATUS ON
DATA waterways 
CLASS
NAME test
OUTLINECOLOR 0 0 0
END

END #end of layer
 END
END


My shapefiles are in folder shapes and there are 3 files:
waterways.shp
waterways.shx
waterways.dbf

Could you help?

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Shape-File-not-appearing-tp6896942p7110856.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] symbol repetition

2011-11-22 Thread knasia
Hi, 
my task is to draw symbols along the road line (I have exact quantity).
It should looks like in the picture beneath.
http://osgeo-org.1803224.n2.nabble.com/file/n7022589/map.png 
My data is road geometry and symbols quantity.
Do you have an idea how to do this?
KN

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/symbol-repetition-tp7022589p7022589.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] Points layer doesn't work.

2011-11-06 Thread knasia
Hi, 
I have a problem with points layer displaying.

When I had data like:
 id   |coor 

|   type
--++---
   60 | 010120E6102F6EA301BCC53340D656EC2FBB074940 | crossroad
   61 | 010120E6103C4ED1915CC633406BB75D68AE074940 | crossroad
   62 | 010120E610E8305F5E80C53340FAD51C2098074940 | crossroad
   63 | 010120E6104576EFF2BECB3340755204DD03034940 | crossroad
then my data looked like:
DATA 'coor FROM nodes using unique id using srid=4326'
 
Now my data in table event looks like:

 id|   lat   |   lng | t   | rad
-+--+--+---+-
   90 | 50.0803967590663 | 19.9726295471191 | 1 | 100
   91 | 50.0595725313664 | 19.9757194519043 | 2 |  20
   99 | 50.0742275601994 | 19.8958969116211 | 2 | 500
 100 |  50.067226578069  | 19.9031066894531 | 0 | 500

And I don't know how DATA should looks like.
I have tried:
 DATA 'ST_GeogFromText('SRID=4326;POINT(' || lng || ' ' || lat || ')')  FROM
event using unique id using srid=4326'
or  
DATA 'the_geom FROM (SELECT ST_GeogFromText('SRID=4326;POINT(' || lng || ' '
|| lat || ')') as the_geom FROM event ) as subquery using unique id using
srid=4326'
but none of them worked.

Has anybody an idea how could that work?

 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Points-layer-doesn-t-work-tp6968512p6968512.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] Re: Drawing different lengths of arrows

2011-10-24 Thread knasia
You were right, the first idea brought some results, but I have a problem
which I cannot solve.

I have splited my line using PostGIS and got a expected results from select. 
Now, when I put it to mapserver it doesn't work as I wish

a)What I want to display is:
DATA 'geom_path FROM (SELECT line_substring( e.geom_path,
*(1-(e.veh_quantity)*7/(e.road_length))*, 1) as geom_path, e.veh_quantity as 
quantity FROM edges   e  JOIN   nodes n  ON EndPoint(e.geom_path)=n.coor
WHEREe.node1_id=n.id  )  as subquery using unique id using srid=4326 '

and it doesn't work properly

b) When I put instead of (1-(e.veh_quantity)*7/(e.road_length)) some special
numbers which come from my select it works good. For example:
DATA 'geom_path FROM (SELECT line_substring( reverse(e.geom_path), *0.2*, 1)
as geom_path, e.veh_quantity as  quantity FROM edges   e  JOIN  nodes n  ON
EndPoint(e.geom_path)=n.coor WHERE   e.node1_id=n.id  )  as subquery using
unique id using srid=4326 '

I have no idea how to solve it.


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Drawing-different-lengths-of-arrows-tp6922584p6925957.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] Re: lane presentation of highways

2011-10-23 Thread knasia
I guess I have found solution to my case. I have drown layers with roads in
both directions (and used offset to seperate them) and layers with arrows
using GEOMTRANSFORM start and GEOMTRANSFORM end
CLASS
NAME 'BA_middle'
STYLE
 ANGLE AUTO
 GEOMTRANSFORM end
 SYMBOL to_vector
 COLOR 255 165 0
 WIDTH 2
 size 4
   END
EXPRESSION (([quantity]=1) AND ([quantity]2))
#COLOR 0 255 0
END

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/lane-presentation-of-highways-tp1970119p6922061.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] Drawing different lengths of arrows

2011-10-23 Thread knasia
Hi, 
I have pointed on my map arrows which reprezent direction of the road. What
I need to do now is to draw colour lines (retaining the geometry of the
road) of the indicated length. I now along which part of the road it should
be drawn (ex. 0.3; 0.5; max1).
How can I indicate the length of the arrow?

I attach a picture showing expected arrow.


http://osgeo-org.1803224.n2.nabble.com/file/n6922584/arrow.png 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Drawing-different-lengths-of-arrows-tp6922584p6922584.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] symbolunits meters doesn't work

2011-10-17 Thread knasia
Hi, 
I am trying to put symbols on the map giving their size in meters, but I
didn't manage. Here is my code. 

LAYER
NAME queue
PROJECTION init=epsg:4326
END

CONNECTIONTYPE postgis
CONNECTION 'user=  password=  dbname=  host=  port='
TRANSPARENCY 95
STATUS ON
DATA 'coor FROM nodes using unique id using srid=4326'
TYPE POINT 
SIZEUNITS meters  

#I have also tried:
#UNITS meters
#SYMBOLSCALE 35000  

CLASS
STYLE
COLOR 102 102 102
SYMBOL cross
SIZE 10  
#WIDTH 2
END
END 
END  

Could somebody please help?

KN

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/symbolunits-meters-doesn-t-work-tp6899443p6899443.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] Re: symbolunits meters doesn't work

2011-10-17 Thread knasia
This is my declaration:

 PROJECTION
  init=epsg:4326
 END
UNITS METERS

No matter what I use my symbol is of a size which has nothing to do with
real legth in meters. When I change zoom level size of a symbol is the same.
I want to have symbols 7 meters long, but they are all the time the same.
Maybe I shouldn't use symbol made of POINTS but something else.

For example now I use arrows such as:
SYMBOL
NAME backArrow
TYPE vector
POINTS
0 1
1 0
-99 -99
0 1
1 2
-99 -99
0 1
4 1
END
STYLE
1 40 1 40
END
END

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/symbolunits-meters-doesn-t-work-tp6899443p6900513.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] Re: lane presentation of highways

2011-10-17 Thread knasia
Unfortunatelly I have to distinguish two directions as i have to put arrows
on the end of each line.

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/lane-presentation-of-highways-tp1970119p6900665.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] problem with truetype symbols

2011-10-17 Thread knasia
Hi, 
am trying to draw an arrows on the line on my geometry.
I have manage to draw arrow using vector type (from
http://osgeo-org.1803224.n2.nabble.com/one-way-roads-drawing-spaced-arrows-td1995303.html):
a)
SYMBOL
NAME 'backArrow'
TYPE vector
POINTS
0 1
1 0
-99 -99
0 1
1 2
-99 -99
0 1
4 1
END
END 

And it works, but when I try to use truetype it doesn't work (nothing
appears on the map)
b)
SYMBOL
NAME fwdArrowFont
TYPE truetype
FONT verdana
CHARACTER 
END

Do I need any additional code or so to make it works?

Second question:
My arrows  (draw as in a) ) are horizontal. 
My task is to distinguish 2 directions of each line from geometry (1st: from
node a to b and snd: from b to a) and draw arrows along the road at the end
of each line.

How can I do this?
How can I draw them along the line?



--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/problem-with-truetype-symbols-tp6900681p6900681.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] Re: symbolunits meters doesn't work

2011-10-17 Thread knasia
Hi, 
I believe init=epsg:4326 is for UNITS DD and init=epsg:26915 is for
UNITS METERS.
I have changed my declaration to init=epsg:26915 and UNITS METERS but
nothing change. Should I do anything more?
  

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/symbolunits-meters-doesn-t-work-tp6899443p6900767.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] Re: lane presentation of highways

2011-10-16 Thread knasia
Hi, 
My case is to draw road lines, but I do not have column DRIVING_DIRECTION,
but I have a grapf of lines where road from node a to b is of one direction
and from b to a another.

How should I comstruct mapfile than?
Could you please help?

KN

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/lane-presentation-of-highways-tp1970119p6898243.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] Re: traffic queues visualization

2011-10-01 Thread knasia
Hi, 
the data I have in database:
-nodes (which represents crossroads), 
-edges (each edge is between 2 nodes) and there is more than 9400 edges in
DB
-number of cars on each edge (I don't have exact car locations)

So there is a lot of cars in a DB.
My roads are composed of nodes and edges. In case of a curved road I have 2
nodes and geometry for a particular edge.

My task is to reprezent traffic in a city as real as possible. That means if
it's feasible it would be great to have some cars (reprezented by points
etc.) closer to each other next to the node (crossroad) and incease distance
between them at the end of the road.

Thanks a lot for helping me :)
KN

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/traffic-queues-visualization-tp6843102p6850657.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] traffic queues visualization

2011-09-29 Thread knasia
hi, 
I have to visualize traffic queues at the crossroads. I have data in
Postgres/PostGIS database.
It would be to the best to show each car separatedly.

So far I have tried some cases, but none of them come out to be useful.

The best would be to mark as many arrows as cars, but I don't know how to
mark arrows on the geometry that would be one next  to another marked from
the node (crossroad) along the road geometry.

Can somebody help to do this or find another idea?

Thank you a lot in advance.

KN

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/traffic-queues-visualization-tp6843102p6843102.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