Re: [OpenLayers-Users] WFS Spherical Mercator

2008-02-12 Thread Jennifer Strahan
Hi Josh,

Thanks for taking a look at this.  Thanks also for the tip regarding 
polygons vs. multipolygons and attribute_cols. 

I've updated to the latest trunk and installed simplejson (I just 
extracted it to the root of my FeatureServer install.  No other config 
required, right?).  I'm still having the same issue.  I think the other 
person who had this problem had misspelled sphericalMercator.  I'm not 
sure what's going on in my case.  I should have mentioned before that 
everything works fine if I'm not using the sphericalMercator layer. 

Anything else I should try?

Thanks,
Jennifer



Jennifer Strahan
GIS Specialist
GreenInfo Network
116 New Montgomery St. Ste. 738
San Francisco, CA 94105
(415)979-0343x306



Josh Livni wrote:
 At first glance I see a featureserver issue -- if you try the url that 
 gets loaded initially (I just checked the firebug console), 
 featureserver returns an error:
 http://69.59.158.11/featureserver/featureserver.cgi/parkinfo_google?format=jsonmaxfeatures=50SERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureSRS=EPSG%3A900913BBOX=-40075016.6784,-40075016.50840001,40075016.6784,40075016.8484
  


 I note if you remove the bbox parameter from the url featureserver 
 works fine.

 I also note someone else had a similar problem the other day on the FS 
 list, but I don't know what happened with that.  I recall he also 
 didn't have simplejson installed.  Can you install that, and ensure 
 you are using the latest featureserver trunk?

  -Josh

 PS - you may wish to use polygons instead of multipolygons, since 
 featureserver does not support the latter (though I don't think this 
 is the problem at hand here), and if using the latest version you can 
 also put  'attribute_cols' in your config to limit the field results - 
 for example you may not need your original the_geom column being 
 returned...


 Jennifer Strahan wrote:
 Hello,

 I'm having trouble overlaying a WFS layer on the Google Spherical 
 Mercator layers.  For some reason, the BBox query fails.  Not sure if 
 it's an issue with my data or with the BBOX values that are added to 
 the URL.

 Here's a link to my test code: http://69.59.158.11/TEST/wfs.html
 The data is in a PostGIS database and I'm using FeatureServer.  
 Originally the SRID for the data I'm working with is 4326.

  In order to convert to 900913, I followed these steps:

 1.  Insert a reference to 900913 into spatial_ref_sys:
 INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, 
 srtext) values ( 900913, 'spatialreference.org', 900913, '+proj=merc 
 +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 
 +units=m [EMAIL PROTECTED] +wktext  +no_defs', 
 'PROJCS[unnamed,GEOGCS[unnamed 
 ellipse,DATUM[unknown,SPHEROID[unnamed,6378137,0]],PRIMEM[Greenwich,0],UNIT[degree,0.0174532925199433]],PROJECTION[Mercator_2SP],PARAMETER[standard_parallel_1,0],PARAMETER[central_meridian,0],PARAMETER[false_easting,0],PARAMETER[false_northing,0],UNIT[Meter,1],EXTENSION[PROJ4,+proj=merc
  
 +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 
 +units=m [EMAIL PROTECTED] +wktext  +no_defs]]');

 2.  Add a new geometry column to my table:
  select 
 addGeometrycolumn('public','holdingsfeb08','the_geom_google',900913,'MULTIPOLYGON',2);
  


 3.  update holdingsfeb08 set the_geom_google = transform(the_geom, 
 900913);

 My FeatureServer config looks like this:
 [parkinfo_google]
 type=PostGIS
 dsn=dbname=parkinfo_review
 layer=holdingsfeb08
 fid=gid
 geometry=the_geom_google

 Anyone have any idea how I can get this working?
 Thanks,
 Jennifer

   

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] Does OpenLayers allow you to control the size of the PanZoomBar?

2008-02-12 Thread David H. McCoy

I would like to make it smaller.
-- 
View this message in context: 
http://www.nabble.com/Does-OpenLayers-allow-you-to-control-the-size-of-the-PanZoomBar--tp15442637p15442637.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] How do you represent multiple layers

2008-02-12 Thread Matt Priour
Actually that is not a very good idea and bad coding practice.
Your problem was including {layers:'basic'} the word basic is not some variable 
relating to type or styule of layers it is an actual layer name in the example 
WMS. Instead of basic you should have your layer names listed there. So your 
code should be:
var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
http://localhost:8085/cgi-bin/mapserv.exe?;,
{map: '/ms4w/apps/app/test.map', mode:'map', format: 'png',
transparent:'false', layers: 'states_poly','states_line'},
{gutter: 15});

 hope that helps
Matt Priour

A variation on your theme worked. I put the multiple layers in the URL

this 
http://localhost:8085/cgi-bin/mapserv.exe?map=/ms4w/apps/app/test.maplayer=states_polylayer=states_linemode=map

seems to equal this

var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
http://localhost:8085/cgi-bin/mapserv.exe?layer=states_polylayer=states_line;,
{map: '/ms4w/apps/app/test.map', mode:'map', format: 'png',
transparent:'false'},
 {layers: 'basic'},
{gutter: 15});

Thanks!___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] Coordinates systems transformations?

2008-02-12 Thread Andrea Maschio
Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)  
should transform the coordinates between differents EPSG codes.

Now I was trying this:

var p = bounds
 console.log(p)
 p = bounds.transform(new OpenLayers.Projection(EPSG: 
900913), new OpenLayers.Projection(EPSG:3003))
 console.log(p)

But p has always the same coords. Btw I am working in a projected  
layer (projected from 3003 to 900913) and my wfs layers are ok, but  
being my coords in the Gauss Boaga metric system, I cannot get them  
correctly trying for example a GetFeatureInfo call using a BBOX.

Shall I perform a linear translation of the coordinates?

Thanks



Andrea Maschio
http://www.superandrew.it

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] WFS Spherical Mercator

2008-02-12 Thread Jennifer Strahan
Hello All,

I figured out what the issue is.  For some reason the generated SQL has 
the wrong SRID.  I figured this out by adding a few lines to PostGIS.py 
to write the sql to a file.  The resulting SQL has 4326 for the SRID 
when it should be 900913. 

For example if my request is:
http://69.59.158.11/featureserver/featureserver.cgi/parkinfo_google?format=WFSmaxfeatures=50SERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureSRS=EPSG%3A900913BBOX=-40075016.6784,-40075016.50840001,40075016.6784,40075016.8484

The sql is:
SELECT AsText(the_geom_google) as fs_text_geom, gid, unit_name, 
agncy_nam, access FROM holdingsfeb08 WHERE the_geom_google  
SetSRID('BOX3D(-40075016.678400 -40075016.508400,40075016.678400 
40075016.848400)'::box3d, 4326) and intersects(the_geom_google, 
SetSRID('BOX3D(-40075016.678400 -40075016.508400,40075016.678400 
40075016.848400)'::box3d, 4326)) LIMIT 50

If I change line 28 from
 def __init__(self, name, srid = 4326, fid = ogc_fid, geometry = 
the_geom, order = , attribute_cols = '*', writable = True, **args):

to

 def __init__(self, name, srid = 900913, fid = ogc_fid, geometry = 
the_geom, order = , attribute_cols = '*', writable = True, **args):

All works fine.  So it seems like the parameter from the URL is not 
overwriting the initial value set here. 

Jennifer



Jennifer Strahan
GIS Specialist
GreenInfo Network
116 New Montgomery St. Ste. 738
San Francisco, CA 94105
(415)979-0343x306



Jennifer Strahan wrote:
 Hi Josh,

 Thanks for taking a look at this.  Thanks also for the tip regarding 
 polygons vs. multipolygons and attribute_cols. 

 I've updated to the latest trunk and installed simplejson (I just 
 extracted it to the root of my FeatureServer install.  No other config 
 required, right?).  I'm still having the same issue.  I think the other 
 person who had this problem had misspelled sphericalMercator.  I'm not 
 sure what's going on in my case.  I should have mentioned before that 
 everything works fine if I'm not using the sphericalMercator layer. 

 Anything else I should try?

 Thanks,
 Jennifer



 Jennifer Strahan
 GIS Specialist
 GreenInfo Network
 116 New Montgomery St. Ste. 738
 San Francisco, CA 94105
 (415)979-0343x306



 Josh Livni wrote:
   
 At first glance I see a featureserver issue -- if you try the url that 
 gets loaded initially (I just checked the firebug console), 
 featureserver returns an error:
 http://69.59.158.11/featureserver/featureserver.cgi/parkinfo_google?format=jsonmaxfeatures=50SERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureSRS=EPSG%3A900913BBOX=-40075016.6784,-40075016.50840001,40075016.6784,40075016.8484
  


 I note if you remove the bbox parameter from the url featureserver 
 works fine.

 I also note someone else had a similar problem the other day on the FS 
 list, but I don't know what happened with that.  I recall he also 
 didn't have simplejson installed.  Can you install that, and ensure 
 you are using the latest featureserver trunk?

  -Josh

 PS - you may wish to use polygons instead of multipolygons, since 
 featureserver does not support the latter (though I don't think this 
 is the problem at hand here), and if using the latest version you can 
 also put  'attribute_cols' in your config to limit the field results - 
 for example you may not need your original the_geom column being 
 returned...


 Jennifer Strahan wrote:
 
 Hello,

 I'm having trouble overlaying a WFS layer on the Google Spherical 
 Mercator layers.  For some reason, the BBox query fails.  Not sure if 
 it's an issue with my data or with the BBOX values that are added to 
 the URL.

 Here's a link to my test code: http://69.59.158.11/TEST/wfs.html
 The data is in a PostGIS database and I'm using FeatureServer.  
 Originally the SRID for the data I'm working with is 4326.

  In order to convert to 900913, I followed these steps:

 1.  Insert a reference to 900913 into spatial_ref_sys:
 INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, 
 srtext) values ( 900913, 'spatialreference.org', 900913, '+proj=merc 
 +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 
 +units=m [EMAIL PROTECTED] +wktext  +no_defs', 
 'PROJCS[unnamed,GEOGCS[unnamed 
 ellipse,DATUM[unknown,SPHEROID[unnamed,6378137,0]],PRIMEM[Greenwich,0],UNIT[degree,0.0174532925199433]],PROJECTION[Mercator_2SP],PARAMETER[standard_parallel_1,0],PARAMETER[central_meridian,0],PARAMETER[false_easting,0],PARAMETER[false_northing,0],UNIT[Meter,1],EXTENSION[PROJ4,+proj=merc
  
 +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 
 +units=m [EMAIL PROTECTED] +wktext  +no_defs]]');

 2.  Add a new geometry column to my table:
  select 
 addGeometrycolumn('public','holdingsfeb08','the_geom_google',900913,'MULTIPOLYGON',2);
  


 3.  update holdingsfeb08 set the_geom_google = transform(the_geom, 
 900913);

 My FeatureServer config looks like this:
 [parkinfo_google]
 type=PostGIS
 dsn=dbname=parkinfo_review
 layer=holdingsfeb08
 fid=gid
 

Re: [OpenLayers-Users] How do you represent multiple layers in a MapServer Query

2008-02-12 Thread David H. McCoy

A variation on your theme worked. I put the multiple layers in the URL

this 
http://localhost:8085/cgi-bin/mapserv.exe?map=/ms4w/apps/app/test.maplayer=states_polylayer=states_linemode=map

seems to equal this

var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
http://localhost:8085/cgi-bin/mapserv.exe?layer=states_polylayer=states_line;,
{map: '/ms4w/apps/app/test.map', mode:'map', format: 'png',
transparent:'false'},
 {layers: 'basic'},
{gutter: 15});

Thanks!


Linda_Rawson wrote:
 
 I think you need to change it to something like this:
 
 var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
 http://localhost:8085/cgi-bin/mapserv?map=/ms4w/apps/app/test.map;,
 {layers: states_poly,states_line},
 {buffer: 0});
 
 Linda
 On Feb 12, 2008 12:54 PM, David H. McCoy [EMAIL PROTECTED] wrote:
 

 I have this

 map=/ms4w/apps/app/test.maplayer=states_polylayer=states_linemode=map

 And I want this

 var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
 http://localhost:8085/cgi-bin/mapserv.exe;,
 {map: '/ms4w/apps/app/test.map, layer:'states_poly,states_line',
 mode:'map',
 format: 'png', transparent:'false'},
 {layers: 'basic'},
 {gutter: 15});



 But it doesn't display. If you want to have multiple occurrances of the
 same
 param, but different values, how is this represented?

 --
 View this message in context:
 http://www.nabble.com/How-do-you-represent-multiple-layers-in-a-MapServer-Query-tp15441564p15441564.html
 Sent from the OpenLayers Users mailing list archive at
 Nabble.comhttp://nabble.com/
 .

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

 
 
 
 -- 
 Linda Rawson
 
 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users
 
 

-- 
View this message in context: 
http://www.nabble.com/How-do-you-represent-multiple-layers-in-a-MapServer-Query-tp15441564p15444101.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Does OpenLayers allow you to control the size of the PanZoomBar?

2008-02-12 Thread Linda Rawson
 numZoomLevels: 5
On the map.  See http://www.openlayers.org/dev/examples/zoomLevels.html

Check out the code that is commented.

Linda
On Feb 12, 2008 1:45 PM, David H. McCoy [EMAIL PROTECTED] wrote:


 I would like to make it smaller.
 --
 View this message in context:
 http://www.nabble.com/Does-OpenLayers-allow-you-to-control-the-size-of-the-PanZoomBar--tp15442637p15442637.html
 Sent from the OpenLayers Users mailing list archive at 
 Nabble.comhttp://nabble.com/
 .

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users




-- 
Linda Rawson
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] How do you represent multiple layers in a MapServer Query

2008-02-12 Thread Linda Rawson
I think you need to change it to something like this:

var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
http://localhost:8085/cgi-bin/mapserv?map=/ms4w/apps/app/test.map;,
{layers: states_poly,states_line},
{buffer: 0});

Linda
On Feb 12, 2008 12:54 PM, David H. McCoy [EMAIL PROTECTED] wrote:


 I have this

 map=/ms4w/apps/app/test.maplayer=states_polylayer=states_linemode=map

 And I want this

 var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
 http://localhost:8085/cgi-bin/mapserv.exe;,
 {map: '/ms4w/apps/app/test.map, layer:'states_poly,states_line',
 mode:'map',
 format: 'png', transparent:'false'},
 {layers: 'basic'},
 {gutter: 15});



 But it doesn't display. If you want to have multiple occurrances of the
 same
 param, but different values, how is this represented?

 --
 View this message in context:
 http://www.nabble.com/How-do-you-represent-multiple-layers-in-a-MapServer-Query-tp15441564p15441564.html
 Sent from the OpenLayers Users mailing list archive at 
 Nabble.comhttp://nabble.com/
 .

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users




-- 
Linda Rawson
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] How do you represent multiple layers in a MapServer Query

2008-02-12 Thread David H. McCoy

I have this 

map=/ms4w/apps/app/test.maplayer=states_polylayer=states_linemode=map

And I want this

var loadedMap = new OpenLayers.Layer.MapServer( OpenLayers WMS,
http://localhost:8085/cgi-bin/mapserv.exe;,
{map: '/ms4w/apps/app/test.map, layer:'states_poly,states_line', mode:'map',
format: 'png', transparent:'false'},
{layers: 'basic'},
{gutter: 15});



But it doesn't display. If you want to have multiple occurrances of the same
param, but different values, how is this represented?

-- 
View this message in context: 
http://www.nabble.com/How-do-you-represent-multiple-layers-in-a-MapServer-Query-tp15441564p15441564.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-12 Thread Eric Lemoine
Hi,

You need the proj4.js library to do reprojection in OpenLayers.

https://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib

Even with that I'm not sure EPSG:3003 will be supported. I recall that
the author of proj4.js (Mike Adair) gave a list of supported
projections on the OpenLayers mailing list but I can't find his email.
Searching the mailing on nabble you should be able to find this list
http://www.nabble.com/OpenLayers-f15906.html.

Hope this helps;
--
Eric




On Feb 13, 2008 1:31 AM, Andrea Maschio [EMAIL PROTECTED] wrote:
 Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
 should transform the coordinates between differents EPSG codes.

 Now I was trying this:

 var p = bounds
  console.log(p)
  p = bounds.transform(new OpenLayers.Projection(EPSG:
 900913), new OpenLayers.Projection(EPSG:3003))
  console.log(p)

 But p has always the same coords. Btw I am working in a projected
 layer (projected from 3003 to 900913) and my wfs layers are ok, but
 being my coords in the Gauss Boaga metric system, I cannot get them
 correctly trying for example a GetFeatureInfo call using a BBOX.

 Shall I perform a linear translation of the coordinates?

 Thanks



 Andrea Maschio
 http://www.superandrew.it

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Edit a freehand polygon

2008-02-12 Thread Stephen Woodbridge
Tim Schaub wrote:
 Hey-
 
 Swärd Mårten wrote:
 Hello!

 I need some functionality that makes it possible to edit the points in a 
 freehand drawn polygon. I know that it’s tecnicaly possible to do this 
 but in real life the edit function, as I know it, is very time 
 counsuming to use due to the many points that has to be modified. The 
 two questions that I have are as follows:

 A) Is it possible to change the edit function so that when you edit one 
 point the naigbor points follows.. And so to say smoothen the curve of 
 the edited point relative to the rest of the points..

 B) If the answer is a big NO on A. =) Is it possible to reduce the 
 number of points that is drawn when using the freehand mode?
 
 This would be an easy modification.  The draw feature control could take 
 a tolerance property in the handlerOptions and addPoint would only get 
 called in freehand mode when the tolerance was met.
 
 B II) Or is it possible to reduce the number of points on a polygon 
 after you have drawn it?
 
 This would require a simplify (Douglas Peucker style) method for 
 geometries.  If there is interest in building a library of more advanced 
 geometry operations client-side, it might do well as a compliment to 
 OpenLayers (not in OL itself).  I'm interested in this.

Tim,

I would also be interested in being able to use feature create and 
editing functionality with OpenLayers. It seems to me that there have 
been other requests for help and support in this area, so there might be 
a lot of user interest. It seems like a natural extension of the 
OpenLayers functionality.

-Steve
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] boundaries of lineString

2008-02-12 Thread Tim Schaub
Hey-

Rupesh M G wrote:
 
 Thank you for the reply. But I think it is not correct.
 
 For example, if I draw the linestring with 4 points, I'm able to see a 
 polygon with 8 vertices.

A linestring geometry with 4 points has 4 points.  When you see it 
rendered, it looks like a polygon to you, but the geometry is just a 
linestring.

It sounds like you're talking about buffering a geometry.  When you 
buffer a linestring geometry, you get a polygon geometry.

Tim

 
 But if I print the components.length of the linestring, it just says 4.
 
 I tried it with the example in the url 
 http://openlayers.org/dev/examples/vector-features.html
 
 
 Regards,
 Rupesh
 
 
 
 *Pierre GIRAUD [EMAIL PROTECTED]*
 
 02/11/2008 03:58 PM
 
   
 To
   Rupesh M G [EMAIL PROTECTED]
 cc
   users@openlayers.org
 Subject
   Re: [OpenLayers-Users] boundaries of lineString
 
 
   
 
 
 
 
 
 It should be quite easy because geometry like lineString and Polygon
 are composite geometries.
 For example, a OpenLayers.LineString has a 'components' property which
 is an array of OpenLayers.Points.
 That way, you can get all the vertices using a loop like following :
 
 for(var i=0; i = thelinestring.components.length; i++) {
// do something with thelinestring.components[i] which is an OL point
 }
 
 Regards,
 Pierre
 
 On Feb 11, 2008 9:02 AM, Rupesh M G [EMAIL PROTECTED] wrote:
  
   Hi,
  
   I'm working on an application about roads. There I need to mark a
   part of the road, and execute some query.
  
   My user will click a set of points to form a sequence of lines passing
   through the center of the road, because there can be bends in the road.
  
   I plan to draw a lineString going through these points. Using a bigger
   strokeWidth, I can show it like a road (or like a filled polygon).
  
   Is there any way to get the vertices of that polygon?
  
  
   Thanks  Regards,
   Rupesh
  
  
  
DISCLAIMER:
  
The information in this e-mail and any attachment is intended only 
 for the
   person to whom it is addressed and may contain confidential and/or
   privileged material. If you have received this e-mail in error, kindly
   contact the sender and destroy all copies of the original 
 communication. IBS
   makes no warranty, express or implied, nor guarantees the accuracy, 
 adequacy
   or completeness of the information contained in this email or any 
 attachment
   and is not liable for any errors, defects, omissions, viruses or for
   resultant loss or damage, if any, direct or indirect.
  
  
  
  
  
   ___
   Users mailing list
   Users@openlayers.org
   http://openlayers.org/mailman/listinfo/users
  
  
 
 
 
 
 _
 
 DISCLAIMER:__ _
 
 The information in this e-mail and any attachment is intended only for 
 the person to whom it is addressed and may contain confidential and/or 
 privileged material. If you have received this e-mail in error, kindly 
 contact the sender and destroy all copies of the original communication. 
 IBS makes no warranty, express or implied, nor guarantees the accuracy, 
 adequacy or completeness of the information contained in this email or 
 any attachment and is not liable for any errors, defects, omissions, 
 viruses or for resultant loss or damage, if any, direct or indirect.
 
 
 
 
 !DSPAM:4033,47b02979256741431913854!
 
 
 
 
 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users
 
 
 !DSPAM:4033,47b02979256741431913854!

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] active layer index

2008-02-12 Thread Christopher Schmidt
On Tue, Feb 12, 2008 at 09:48:39AM -0500, D. Eric Keefauver wrote:
 Can anyone tell me how to get the index of the selected baselayer in the
 layer switcher?

Why do you need to?

The baseLayer itself is available via map.baseLayer; with that do you
still need the index?

Regards,
-- 
Christopher Schmidt
MetaCarta
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Edit a freehand polygon

2008-02-12 Thread Eric Lemoine
Tim, what kind of advanced geometry ops are you thinking of? Are you
referring to drawing functionalities? Anyway this makes me think of
the addins we're talking about. This lib could be an OL addin. Thx.
Eric

2008/2/12, Tim Schaub [EMAIL PROTECTED]:
 Hey-

 Swärd Mårten wrote:
  Hello!
 
  I need some functionality that makes it possible to edit the points in a
  freehand drawn polygon. I know that it's tecnicaly possible to do this
  but in real life the edit function, as I know it, is very time
  counsuming to use due to the many points that has to be modified. The
  two questions that I have are as follows:
 
  A) Is it possible to change the edit function so that when you edit one
  point the naigbor points follows.. And so to say smoothen the curve of
  the edited point relative to the rest of the points..
 
  B) If the answer is a big NO on A. =) Is it possible to reduce the
  number of points that is drawn when using the freehand mode?

 This would be an easy modification.  The draw feature control could take
 a tolerance property in the handlerOptions and addPoint would only get
 called in freehand mode when the tolerance was met.

 
  B II) Or is it possible to reduce the number of points on a polygon
  after you have drawn it?

 This would require a simplify (Douglas Peucker style) method for
 geometries.  If there is interest in building a library of more advanced
 geometry operations client-side, it might do well as a compliment to
 OpenLayers (not in OL itself).  I'm interested in this.

 Tim

 
  Best regards: Mårten
 
 
  
 
  *Mvh:*
 
  Mårten Swärd
 
  Systemutvecklare/Webbutvecklare, ITs
 
  SMHI, Sveriges Meteorologiska och Hydrologiska Institut
 
  Tel: +46 11 495 8469
 
  !DSPAM:4033,47b03037265381431913854!
 
 
  
 
  ___
  Users mailing list
  Users@openlayers.org
  http://openlayers.org/mailman/listinfo/users
 
 
  !DSPAM:4033,47b03037265381431913854!

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Coordinates systems transformations?

2008-02-12 Thread Andrea Maschio
Ok, you're right 3003 isn't supported. But giving the Proj4 definition  
i have in my proj4 (java) epsg file, which is

3003 +proj=tmerc +lat_0=0 +lon_0=9 +k=0.999600 +x_0=150 +y_0=0  
+ellps=intl +units=m +no_defs  

i could simply add my definition like this

Proj4js.defs[EPSG:3003] = +title=Gauss Boaga EPSG:3003 \
   +proj=tmerc
   +lat_0=0
   +lon_0=9
   +k=0.999600
   +x_0=150
   +y_0=0
   +ellps=intl
   +units=m
   +no_defs;

? And as I see, OpenLayers actually doesn't use proj4.js for  
reprojecting, am I right? How can I perform the client side  
reprojection?

Geoserver does it correctly but when my map is in utm coordinates  
(these are the googlish one, right?) if I try to get a feature via  
BBOX the BBOX it is not in the original feature's projection  
coordinates.

Thanks a lot
Andrea Maschio

Il giorno 13/feb/08, alle ore 06:56, Eric Lemoine ha scritto:

 Hi,

 You need the proj4.js library to do reprojection in OpenLayers.

 https://svn.codehaus.org/mapbuilder/cscs/trunk/proj4js/lib

 Even with that I'm not sure EPSG:3003 will be supported. I recall that
 the author of proj4.js (Mike Adair) gave a list of supported
 projections on the OpenLayers mailing list but I can't find his email.
 Searching the mailing on nabble you should be able to find this list
 http://www.nabble.com/OpenLayers-f15906.html.

 Hope this helps;
 --
 Eric




 On Feb 13, 2008 1:31 AM, Andrea Maschio [EMAIL PROTECTED]  
 wrote:
 Hi all, I suppose that the method Bounds.transform(ProjA, ProjB)
 should transform the coordinates between differents EPSG codes.

 Now I was trying this:

var p = bounds
 console.log(p)
 p = bounds.transform(new OpenLayers.Projection(EPSG:
 900913), new OpenLayers.Projection(EPSG:3003))
 console.log(p)

 But p has always the same coords. Btw I am working in a projected
 layer (projected from 3003 to 900913) and my wfs layers are ok, but
 being my coords in the Gauss Boaga metric system, I cannot get them
 correctly trying for example a GetFeatureInfo call using a BBOX.

 Shall I perform a linear translation of the coordinates?

 Thanks



 Andrea Maschio
 http://www.superandrew.it

 ___
 Users mailing list
 Users@openlayers.org
 http://openlayers.org/mailman/listinfo/users


___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users