shapedotnet-development Mailing List for Shape.Net (Page 2)
Status: Beta
Brought to you by:
k5jvc
You can subscribe to this list here.
| 2004 |
Jan
(16) |
Feb
(14) |
Mar
(6) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|---|
|
From: John C. <jo...@k5...> - 2004-01-22 18:42:01
|
Is anyone else seeing an intermittent null reference exception when loading a polygon shapefile for the first time? It happens to me when I don't use the SDN viewer for a while (a day or two) and the first layer I load is a polygon type. Immediately after the initial crash, if I load the same polygon file again, it works fine. If I load a line or point type as the first layer everything is always fine. If I load a polygon as the second layer everything is always fine. The null reference is a GDI pen in the render thread. Weird... Looks like a GDI+ bug from where I'm sitting. Also, is everyone using .Net 1.0 runtimes? John |
|
From: E. P. <er...@pe...> - 2004-01-18 19:45:59
|
Hi John,
ok, good thinking there :D
It seems i overlooked the 'adding layer by string',... think i used in
0.8 or 0.9.
BTW, could you post a snippet on handling the stretch/warp as you tried,
but where not satisfied with?
Me.
-----Original Message-----
From: sha...@li...
[mailto:sha...@li...] On Behalf
Of John Coleman
Sent: zondag 18 januari 2004 20:01
To: sha...@li...
Subject: Re: [Shapedotnet-development] m_map and Canvas to be public
Yep, you're right they need to be public. It makes the control
significantly easier to use and to maintain.
I added the property "MapCanvas" to the control and it returns the
PictureBox that the map is drawn to.
I added the property "MapCollection" to the control and it returns the
Map object of the control.
So your example will look like this now:
private void DrawAtCenter (double ptX, double ptY)
{
// Center & Draw
mapControl.MapCollection.Center(ptX, ptY);
mapControl.Draw();
// Visualize point
Graphics g;
g = mapControl.MapCanvas.CreateGraphics();
g.CompositingMode = CompositingMode.SourceOver;
g.SmoothingMode = SmoothingMode.HighQuality;
g.TranslateTransform(mapControl.Width /2,mapControl.Height/2);
Point[] curvePoints =
{
new Point( 0, 10),
new Point( 3, 3),
new Point( 10, 0),
new Point( 3, -3),
new Point( 0, -10),
new Point( -3, -3),
new Point( -10, 0),
new Point( -3, 3),
};
// Draw polygon
g.DrawPolygon(new Pen(Color.Black,1), curvePoints);
g.FillPolygon(Brushes.Chartreuse, curvePoints, FillMode.Winding);
g.FillEllipse(Brushes.Red, -2, -2, 4, 4);
g.Dispose();
}
How's that?
As for your last request, I added the ability to add a new layer by
passing in a string in beta 1.
Thanks!
John
E. Perik wrote:
Hi John,
For certain tasks it needs the m_map and Canvas to be public, see the
examples below.
Any intents of changing them to a non-protected status?
Also using an aditional add-layer method (see below),...think this would
be interesting to fit in too. For an application one can add some layers
by default when starting up.
HTH,
Me.
// Modified in the control:
public System.Windows.Forms.PictureBox Canvas;
public Map m_map;
// Example to draw upon the canvas
// --> Needs m_map and Canvas set to public:
private void DrawAtCenter (double ptX, double ptY)
{
// Center & Draw
mapControl.m_map.Center(ptX, ptY);
mapControl.Draw();
// Visualize point
Graphics g;
g = mapControl.Canvas.CreateGraphics();
g.CompositingMode = CompositingMode.SourceOver;
g.SmoothingMode = SmoothingMode.HighQuality;
g.TranslateTransform(mapControl.Width /2,mapControl.Height/2);
Point[] curvePoints =
{
new Point( 0, 10),
new Point( 3, 3),
new Point( 10, 0),
new Point( 3, -3),
new Point( 0, -10),
new Point( -3, -3),
new Point( -10, 0),
new Point( -3, 3),
};
// Draw polygon
g.DrawPolygon(new Pen(Color.Black,1), curvePoints);
g.FillPolygon(Brushes.Chartreuse, curvePoints, FillMode.Winding);
g.FillEllipse(Brushes.Red, -2, -2, 4, 4);
g.Dispose();
}
// Example for hardcoded zooming
// --> Needs m_map and Canvas set to public:
myRect = new GIS.RectangleD();
myPoint1 = new GIS.PointD();
myPoint2 = new GIS.PointD();
myPoint1.X = 3.3;
myPoint1.Y = 53.7;
myPoint2.X = 7.5;
myPoint2.Y = 50.6;
myRect.UL = myPoint1;
myRect.LR = myPoint2;
mapControl.m_map.ZoomArea(myRect);
mapControl.Draw();
// GIS.Map.cs --> Add a map without dialog box
[Description("Read file without dialog"),
Browsable( false )]
public void AddLayerFromString(string path_and_name_of_shapefile)
{
this.Cursor = Cursors.AppStarting;
m_map.Add( path_and_name_of_shapefile );
this.Cursor = Cursors.Default;
Draw();
}
CalculateExtents is not used in the AddLayerFromString example above,...
this would be something for the user to decide.
------------------------------------------------------- The SF.Net email
is sponsored by EclipseCon 2004 Premiere Conference on Open Tools
Development and Integration See the breadth of Eclipse activity.
February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn
_______________________________________________ Shapedotnet-development
mailing list Sha...@li...
https://lists.sourceforge.net/lists/listinfo/shapedotnet-development
|
|
From: John C. <jo...@k5...> - 2004-01-18 19:00:09
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Yep, you're right they need to be public. It makes the control
significantly easier to use and to maintain.<br>
<br>
I added the property "MapCanvas" to the control and it returns the
PictureBox that the map is drawn to.<br>
I added the property "MapCollection" to the control and it returns the
Map object of the control.<br>
<br>
So your example will look like this now:<br>
<br>
<big><tt><font size="2"><big>private void <span
class="139190511-18012004"> DrawAtCenter </span>(double ptX, double
ptY)<br>
{<br>
// Center & Draw<br>
mapControl.<b>MapCollection</b>.Center(ptX, ptY);<br>
mapControl.Draw();<br>
// Visualize point<br>
Graphics g;<br>
g = mapControl.<b>MapCanvas</b>.CreateGraphics();<br>
g.CompositingMode = CompositingMode.SourceOver; <br>
g.SmoothingMode = SmoothingMode.HighQuality;<br>
g.TranslateTransform(mapControl.Width /2,mapControl.Height/2);<br>
Point[] curvePoints =<br>
{<br>
new Point( 0, 10),<br>
new Point( 3, 3),<br>
new Point( 10, 0),<br>
new Point( 3, -3),<br>
new Point( 0, -10),<br>
new Point( -3, -3),<br>
new Point( -10, 0),<br>
new Point( -3, 3),<br>
};<br>
// Draw polygon <br>
g.DrawPolygon(new Pen(Color.Black,1), curvePoints);<br>
g.FillPolygon(Brushes.Chartreuse, curvePoints, FillMode.Winding);<br>
g.FillEllipse(Brushes.Red, -2, -2, 4, 4);<br>
g.Dispose();<br>
}</big></font></tt></big><br>
<br>
How's that?<br>
<br>
As for your last request, I added the ability to add a new layer by
passing in a string in beta 1.<br>
<br>
Thanks!<br>
John<br>
<br>
E. Perik wrote:<br>
<blockquote type="cite" cite="mid000001c3ddb3$cc966a40$0a01a8c0@xp">
<meta http-equiv="Content-Type" content="text/html; ">
<title>Message</title>
<meta content="MSHTML 6.00.2800.1106" name="GENERATOR">
<div><font face="Arial"><font size="2"><span
class="139190511-18012004">Hi John,</span></font></font></div>
<div><font face="Arial"><font size="2"><span
class="139190511-18012004"> </span></font></font></div>
<div><font><font face="Arial"><font size="2">For certain tasks it
needs the m_map and Canvas to be public, see the examples below. <br>
Any intents of changing them to a non-protected status?<span
class="139190511-18012004"> </span></font></font></font></div>
<div> </div>
<div><font><font face="Arial"><font size="2"><span
class="139190511-18012004">Also using an aditional add-layer method
(see below),...think this would be interesting to fit in too. For an
application one can add some layers by default when starting up. </span></font></font></font></div>
<div> </div>
<div><font><font face="Arial"><font size="2"><span
class="139190511-18012004">HTH,</span></font></font></font></div>
<div> </div>
<div><font><font face="Arial"><font size="2"><span
class="139190511-18012004">Me. </span></font></font></font></div>
<div> </div>
<blockquote dir="ltr" style="margin-right: 0px;">
<div><font face="Arial"><font size="2"><span
class="139190511-18012004"> //</span><span class="139190511-18012004">
Modified in the control: </span><br>
public System.Windows.Forms.PictureBox <strong>Canvas</strong>;<br>
public Map <strong>m_map</strong>;</font></font></div>
<div> </div>
<div><br>
<font face="Arial" size="2"> // Example to draw upon the canvas<br>
// --> Needs <strong>m_map</strong> and <strong>Canvas</strong>
set to public:<br>
private void <span class="139190511-18012004"> DrawAtCenter </span>(double
ptX, double ptY)<br>
{<br>
// Center & Draw<br>
mapControl.m_map.Center(ptX, ptY);<br>
mapControl.Draw();<br>
// Visualize point<br>
Graphics g;<br>
g = mapControl.Canvas.CreateGraphics();<br>
g.CompositingMode = CompositingMode.SourceOver; <br>
g.SmoothingMode = SmoothingMode.HighQuality;<br>
g.TranslateTransform(mapControl.Width /2,mapControl.Height/2);<br>
Point[] curvePoints =<br>
{<br>
new Point( 0, 10),<br>
new Point( 3, 3),<br>
new Point( 10, 0),<br>
new Point( 3, -3),<br>
new Point( 0, -10),<br>
new Point( -3, -3),<br>
new Point( -10, 0),<br>
new Point( -3, 3),<br>
};<br>
// Draw polygon <br>
g.DrawPolygon(new Pen(Color.Black,1), curvePoints);<br>
g.FillPolygon(Brushes.Chartreuse, curvePoints, FillMode.Winding);<br>
g.FillEllipse(Brushes.Red, -2, -2, 4, 4);<br>
g.Dispose();<br>
}</font></div>
<div> </div>
<div><br>
<font face="Arial" size="2"> // Example for hardcoded zooming<br>
// --> Needs <strong>m_map</strong> and <strong>Canvas</strong>
set to public:<br>
myRect = new GIS.RectangleD();<br>
myPoint1 = new GIS.PointD();<br>
myPoint2 = new GIS.PointD();<br>
myPoint1.X = 3.3;<br>
myPoint1.Y = 53.7;<br>
myPoint2.X = 7.5;<br>
myPoint2.Y = 50.6;<br>
myRect.UL = myPoint1;<br>
myRect.LR = myPoint2;<br>
mapControl.m_map.ZoomArea(myRect);<br>
mapControl.Draw();</font></div>
<div> </div>
<div> </div>
<div> </div>
<div><font face="Arial" size="2"> // <strong>GIS.Map.cs</strong>
--> Add a map without dialog box<br>
[Description("Read file without dialog"), <br>
Browsable( false )]<br>
public void AddLayerFromString(string path_and_name_of_shapefile)<br>
{<br>
this.Cursor = Cursors.AppStarting;<br>
m_map.Add( path_and_name_of_shapefile );<br>
this.Cursor = Cursors.Default; <br>
Draw();<br>
}</font></div>
</blockquote>
<div> </div>
<div><font face="Arial"><font size="2">CalculateExtents is not used
in the AddLayerFromString example above,... this would be something for
the user to decide.<span class="139190511-18012004"> </span></font></font></div>
<div> </div>
<div> </div>
</blockquote>
</body>
</html>
|
|
From: E. P. <er...@pe...> - 2004-01-18 11:11:20
|
Hi John,
For certain tasks it needs the m_map and Canvas to be public, see the
examples below.
Any intents of changing them to a non-protected status?
Also using an aditional add-layer method (see below),...think this would
be interesting to fit in too. For an application one can add some layers
by default when starting up.
HTH,
Me.
// Modified in the control:
public System.Windows.Forms.PictureBox Canvas;
public Map m_map;
// Example to draw upon the canvas
// --> Needs m_map and Canvas set to public:
private void DrawAtCenter (double ptX, double ptY)
{
// Center & Draw
mapControl.m_map.Center(ptX, ptY);
mapControl.Draw();
// Visualize point
Graphics g;
g = mapControl.Canvas.CreateGraphics();
g.CompositingMode = CompositingMode.SourceOver;
g.SmoothingMode = SmoothingMode.HighQuality;
g.TranslateTransform(mapControl.Width /2,mapControl.Height/2);
Point[] curvePoints =
{
new Point( 0, 10),
new Point( 3, 3),
new Point( 10, 0),
new Point( 3, -3),
new Point( 0, -10),
new Point( -3, -3),
new Point( -10, 0),
new Point( -3, 3),
};
// Draw polygon
g.DrawPolygon(new Pen(Color.Black,1), curvePoints);
g.FillPolygon(Brushes.Chartreuse, curvePoints, FillMode.Winding);
g.FillEllipse(Brushes.Red, -2, -2, 4, 4);
g.Dispose();
}
// Example for hardcoded zooming
// --> Needs m_map and Canvas set to public:
myRect = new GIS.RectangleD();
myPoint1 = new GIS.PointD();
myPoint2 = new GIS.PointD();
myPoint1.X = 3.3;
myPoint1.Y = 53.7;
myPoint2.X = 7.5;
myPoint2.Y = 50.6;
myRect.UL = myPoint1;
myRect.LR = myPoint2;
mapControl.m_map.ZoomArea(myRect);
mapControl.Draw();
// GIS.Map.cs --> Add a map without dialog box
[Description("Read file without dialog"),
Browsable( false )]
public void AddLayerFromString(string path_and_name_of_shapefile)
{
this.Cursor = Cursors.AppStarting;
m_map.Add( path_and_name_of_shapefile );
this.Cursor = Cursors.Default;
Draw();
}
CalculateExtents is not used in the AddLayerFromString example above,...
this would be something for the user to decide.
|
|
From: John C. <jo...@k5...> - 2004-01-18 05:37:48
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hmm. It's difficult to create an IMapLayer (<font size="2"><span
style="font-size: 10pt; font-family: Arial;">Shapefile object)</span></font>
outside of the Map object because I didn't design it to work that way.
I had intended for the Add method to be used when a new layer needs to
be created. The insert method was put in only so that I could move
layers up and down easily after they had been created with the Add
method. See the MoveLayerUp( int index ) and the MoveLayerDown( int
index ) methods in MapControl.cs for an example of this.<br>
<br>
I think exposing <font size="2"><span
style="font-size: 10pt; font-family: Arial;">_mapMetrics as a public
property would be dangerous because it holds information read directly
from the shapefile and uses calculations made from this information to
convert real coordinates into local (pixel) coordinates for the map as
a whole (so your #2 would not work, all map layers must have access to
these calculations). All layers need access to the *same*
World2Pixel(...) and Pixel2World(...) methods. If it were public, it
would open up the possibility of corrupting the information from
outside the Map class in ways that I haven't considered yet. I had
also envisioned the </span></font><font size="2"><span
style="font-size: 10pt; font-family: Arial;">_mapMetrics object
containing projection, datum, and ellipsiod information in the future.</span></font><br>
<font size="2"><span style="font-size: 10pt; font-family: Arial;"><br>
The Shapefile class exists only to be a IMapLayer, that's it. As a
class that implements IMapLayer, it should only exist within the
confines of a Map class collection. My goal with the IMapLayer
interface was to make it easy to write new file format readers in the
future. I didn't intend for these </span></font><font size="2"><span
style="font-size: 10pt; font-family: Arial;">file format readers to be
stand alone objects. You can see on line 40 in IMapLayer.cs my master
plan:<br>
<br>
</span></font><font size="2">public enum LayerSubType { Shapefile, Mif,
E00, GeoTIFF }</font><br>
<br>
These are the file formats that I would like SDN to support in the near
future. As always, if you see a hole in my strategy, please tell me so
we can discuss it. There's always a better way.<br>
<br>
Rife, Ryan wrote:<br>
<blockquote type="cite"
cite="mid...@or...">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1120145861;
mso-list-type:hybrid;
mso-list-template-ids:-1123529014 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">I found it hard to create
a shapefile outside of the Map
object’s AddLayer method and later use the Map’s InsertLayer method
to add it to the map. This is mostly because of the Shapefile’s
contructor requiring a MapMetric object. I think it would be useful to”<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><span style="">1)<font
size="1" face="Times New Roman"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-stretch: normal; font-size-adjust: none;">
</span></font></span></span></font><!--[endif]--><font size="2"
face="Arial"><span style="font-size: 10pt; font-family: Arial;">expose
the Map’s
_mapMetrics variable as a public property so it can be used in the
creation of
standalone Shapefile objects<o:p></o:p></span></font></p>
<p class="MsoNormal" style="margin-left: 0.25in;"><font size="2"
face="Arial"><span style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left: 0.25in;"><font size="2"
face="Arial"><span style="font-size: 10pt; font-family: Arial;">and/or<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><font
size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><span style="">2)<font
size="1" face="Times New Roman"><span
style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-stretch: normal; font-size-adjust: none;">
</span></font></span></span></font><!--[endif]--><font size="2"
face="Arial"><span style="font-size: 10pt; font-family: Arial;">have a
Shapefile
constructor that does not require a MapMetrics object and have a
metrics
property on the Shapefile that can be set during the InsertLayer method
call on
the Map<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">I prefer the 2<sup>nd</sup>
approach mostly because it
allows for the most flexibility. Later.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Ryan Rife<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Senior Software Developer<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Pacific Western
Technologies<o:p></o:p></span></font></p>
</div>
</blockquote>
</body>
</html>
|
|
From: John C. <jo...@k5...> - 2004-01-18 04:50:40
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Layer visibility thresholds became a hot topic with a previous project
I was a part of. The trouble is, what units of measurement do you use
to toggle a layers visibility? I see that you're using a percentage in
your example, but is that a percentage of the viewport as compared to
extents of the map, or the map layer? While we're considering it, is
that a percentage of area coverage or a percentage of total map
features, or a percentage of layer features? Area will probably
provide the least performance hit to calculate, but then you run into
the issue of one layer being in a lat/lon format and a second layer in
the map being projected in feet or meters or...<br>
<br>
I think trying to make this work at the GIS namespace level is a
recipe for headaches, it's too application specific. Best to provide
some sort of metric that represents the current "zoom level" or scale
as a property of the Map object and let the application developer
determine how to handle it. We could even go one step further and
raise a custom event like OnScaleChange or some such.<br>
<br>
I know this looks like a simple issue, but I've been bit before and I
could never get the solution generic enough to work correctly in all
situations. Of course I don't claim to be the sharpest pencil in the
drawer and I never say never, someone else may have a workable generic
solution. I love reading code. :)<br>
<br>
John<br>
<br>
Rife, Ryan wrote:<br>
<blockquote type="cite"
cite="mid...@or...">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">I’m not sure if this
needs to be part of SDN or the
parent application or if it already exists, but the application I am
working
needs to be able to set the layer’s visibility based on far in the user
has zoomed into the map. For example if a layer could have a
visibility range
of 20%-50% so when 50% or less of the map is visible then the layer is
automatically turned on….if the map is only 20% visible or goes more
than
50% visible then the layer would automatically turn off. Later.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Ryan Rife<o:p></o:p></span></font></p>
</div>
</blockquote>
</body>
</html>
|
|
From: Rife, R. <ri...@pw...> - 2004-01-16 21:26:24
|
I found it hard to create a shapefile outside of the Map object's AddLayer method and later use the Map's InsertLayer method to add it to the map. This is mostly because of the Shapefile's contructor requiring a MapMetric object. I think it would be useful to" =20 1) expose the Map's _mapMetrics variable as a public property so it can be used in the creation of standalone Shapefile objects =20 and/or =20 2) have a Shapefile constructor that does not require a MapMetrics object and have a metrics property on the Shapefile that can be set during the InsertLayer method call on the Map =20 I prefer the 2nd approach mostly because it allows for the most flexibility. Later. =20 Ryan Rife Senior Software Developer Pacific Western Technologies |
|
From: Rife, R. <ri...@pw...> - 2004-01-16 19:56:08
|
I'm not sure if this needs to be part of SDN or the parent application or if it already exists, but the application I am working needs to be able to set the layer's visibility based on far in the user has zoomed into the map. For example if a layer could have a visibility range of 20%-50% so when 50% or less of the map is visible then the layer is automatically turned on....if the map is only 20% visible or goes more than 50% visible then the layer would automatically turn off. Later. =20 Ryan Rife |
|
From: John C. <jo...@k5...> - 2004-01-14 21:14:04
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
I've just been using the overridden ToString() method of the
implementation of the IMapLayer. I agree though, it needs to be
spelled out in the IMapLayer interface. I'll add the "LayerName"
property to IMapLayer for Beta 2.<br>
<br>
John<br>
<br>
Rife, Ryan wrote:<br>
<blockquote type="cite"
cite="mid...@or...">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">I was thinking it might
be nice to have a description and/or
layername property in the IMapLayer interface. This makes it easier to
dynamically build and configure a list of layers for a layer control
panel from
the layers that have been added to the map. Just a thought though.
Later.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">-Ryan<o:p></o:p></span></font></p>
</div>
</blockquote>
</body>
</html>
|
|
From: Rife, R. <ri...@pw...> - 2004-01-14 19:56:27
|
I was thinking it might be nice to have a description and/or layername property in the IMapLayer interface. This makes it easier to dynamically build and configure a list of layers for a layer control panel from the layers that have been added to the map. Just a thought though. Later. =20 -Ryan |
|
From: Rife, R. <ri...@pw...> - 2004-01-13 21:13:56
|
I'm taking a first stab at building an asp.net usercontrol that uses SDN to render maps (I've got a sample project available upon request). I'm looking for some input and direction on how to proceed or would like to know if anybody is attempting this as well. Thanks. =20 Ryan Rife Senior Software Developer Pacific Western Technologies |
|
From: John C. <jo...@k5...> - 2004-01-12 22:33:10
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Oh, ok. I understand the need to add the same layer twice. I have a
simpler solution to the problem. The layer properties dialog in the
example application currently will not let you set the Line Width /
Point Size to 0. I just changed it so that you can set it to 0 and it
gives the desired effect, showing labels without the features. Much
easier! You can do it programmatically like this:<br>
<br>
mapControl[0].LayerPen.Width = 0;<br>
<br>
Since the pen used to draw the labels is seperate from the pen used to
draw the features, this works fine.<br>
<br>
E. Perik wrote:<br>
<blockquote type="cite" cite="mid000001c3d957$3f0721c0$0a01a8c0@xp">
<meta http-equiv="Content-Type" content="text/html; ">
<title>Message</title>
<meta content="MSHTML 6.00.2800.1106" name="GENERATOR">
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">Hi John,</font></span></div>
<div> </div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">TFYA</font></span></div>
<div> </div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">Warped image,... will do some investigating
here,...</font></span></div>
<div> </div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">Regarding the same shapefile twice,...:</font></span></div>
<div> </div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">SDN is ideal for GIS viewing (editing too
hopefully:D) and my idea for the viewer is to let the user add a layer
as point, line, polygon, or label. If the user has a point-shapefile
with cities, it would load it as a label-layer only and not show the
points. Another layer could hold the points of the city or a total
different presentation of cities (polygons). </font></span></div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">The logic is that for that kind of viewer the
user can i.e. select/deselect an checkbox to see/disable the
label-layer but still see the points layer or polygon layer.</font></span></div>
<div> </div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">Ofcourse, such a viewer could be set up to
combine this, but when looking at eg. ArcExplorer it has the capability
to not draw the feature (point.line).</font></span></div>
<div> </div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">Hope this makes sense?</font></span></div>
<div> </div>
<div><span class="089354721-12012004"><font face="Arial"
color="#0000ff" size="2">Me.</font></span></div>
<div> </div>
<div> </div>
<div> </div>
<blockquote style="margin-right: 0px;">
<div class="OutlookMessageHeader" lang="en-us" dir="ltr"
align="left"><font face="Tahoma" size="2">-----Original Message-----<br>
<b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:sha...@li...">sha...@li...</a>
[<a class="moz-txt-link-freetext" href="mailto:sha...@li...">mailto:sha...@li...</a>] <b>On
Behalf Of </b>John Coleman<br>
<b>Sent:</b> maandag 12 januari 2004 22:38<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:sha...@li...">sha...@li...</a><br>
<b>Subject:</b> [Shapedotnet-development] Re: Alright... here we go<br>
<br>
</font></div>
Ok, Lets see... <br>
<br>
1. Warped map (resize problem) is a complicated one and the solution
that was offered a few months ago didn't work. I think I'm going to
leave this as is for 1.0, I really don't think it's a show stopper.<br>
<br>
2. Need to stay at current viewport extents when adding or removing a
layer. Makes sense, I'll fix that.<br>
<br>
3. .dbf locking is a known issue that I keep forgetting about, I
promise I'll fix that before beta 2.<br>
<br>
Now explain to me again why you're adding the same shapfile layer to
the map twice. I just don't understand that one. I updated all of the
wish list items submitted to Sourceforge so check them out and let me
know if there are any issues or if I didn't explain my reasoning well
enough.<br>
<br>
<br>
</blockquote>
</blockquote>
</body>
</html>
|
|
From: John C. <jo...@k5...> - 2004-01-12 21:37:40
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
Ok, Lets see... <br>
<br>
1. Warped map (resize problem) is a complicated one and the solution
that
was offered a few months ago didn't work. I think I'm going to leave
this as is for 1.0, I really don't think it's a show stopper.<br>
<br>
2. Need to stay at current viewport extents when adding or removing a
layer. Makes sense, I'll fix that.<br>
<br>
3. .dbf locking is a known issue that I keep forgetting about, I
promise
I'll fix that before beta 2.<br>
<br>
Now explain to me again why you're adding the same shapfile layer to
the map twice. I just don't understand that one. I updated all of the
wish list items submitted to Sourceforge so check them out and let me
know if there are any issues or if I didn't explain my reasoning well
enough.<br>
<br>
E. Perik wrote:<br>
<blockquote type="cite" cite="mid000001c3d6d1$328769b0$0a01a8c0@xp">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 77.95pt 72.0pt 77.95pt;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Me agm,...</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Compiles without any problems,... good thin
query is back, otherwise I would
not have noticed the road I picked:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"><br>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">[ see the query Info :D ]</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">No bugs found to this point, however do have
wish,… dono correct
word, but when zooming with rectangle it seems to have good length x
width, but
when resizing form,..:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"><br>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"><br>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">width x height logic is not there anymore,…
think you got mail
from someone 3 months back who had simple solution there,… ehm,… :D</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Another one,…if a layer is removed,… extents
are
re-calculated and view is then set to extents… think it’s nicer for
users to stay in current view-rectangle when removing/adding layer.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">When adding a layer the view is not set to
extents, but to,… dono,…
does not make sense.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">[ before remove: ]</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"><br>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">[ after remove (extents): ]</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"><br>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Also,… in the case above I removed <b><span
style="font-weight: bold;">dkk_v.shp</span></b> layer. When I want to
add it again (after remove) I get:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">“Additional information: The process cannot
access the file
"E:\C# ShapeDotNet\data-rbzg\dkk_v.dbf" because it is being used by
another process.”</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Seems it is still existing somewhere after
removing.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Same is when one wants to import the
shapefile two times:</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"><br>
</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Adding a shapefile two times I do for showing
let’s say manholes
and then another instance of that shapefile to toggle of labels. This
‘could’
be done at designtime, but most things is user,… add it as a
point/line/polygon/label layer. The label layer is then the 2<sup>nd</sup>
instance
(well in my case :D).</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Hope this helps, but think I already have
most of these in the wishlist
anyway.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Have a good weekend,…</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">Me.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">-----Original Message-----<br>
From: John Coleman [<a class="moz-txt-link-freetext"
href="mailto:jo...@k5...">mailto:jo...@k5...</a>] <br>
Sent: vrijdag 9 januari 2004 05:55<br>
To: E.Perik<br>
Subject: Alright... here we go</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">I just released SDN v1.0 BETA 1! Can you
help me out and
subscribe to </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">the mailing list so that any bugs that you
find can be "out in the
open" </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">where everyone can see? When you have the
time please test out
the </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">binary release as well as checking the
source. The mailing list
is </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">here:
<a class="moz-txt-link-freetext"
href="http://lists.sourceforge.net/lists/listinfo/shapedotnet-development">http://lists.sourceforge.net/lists/listinfo/shapedotnet-development</a></span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">I can't believe we finally made it, seems
like I started playing with </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">iNova years ago.</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;">John</span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
<p class="MsoPlainText"><font size="2" face="Courier New"><span
style="font-size: 10pt;"> </span></font></p>
</div>
</blockquote>
</body>
</html>
|
|
From: John C. <jo...@k5...> - 2004-01-09 04:37:49
|
I just posted SDN 1.0 beta 1 and I really need feedback from everyone. Bugs, examples, documentation, anything that you feel is lacking. Just keep in mind that SDN is "feature complete" at this point and no new functionality will be added for the v1.0 stable release. All new feature requests should be submitted through the "RFE" link on the Sourceforge project page and they will be discussed when development on v1.2 starts. Unless a real show stopper rears its ugly head, I plan on beta 1 being the last release for about a month. This should allow enough time for everyone to poke at it and find the cracks. :) Thanks! John |
|
From: John C. <jo...@k5...> - 2004-01-09 04:23:22
|
I just posted SDN 1.0 beta 1 and I really need feedback from everyone. Bugs, examples, documentation, anything that you feel is lacking. Just keep in mind that SDN is "feature complete" at this point and no new functionality will be added for the v1.0 stable release. All new feature requests should be submitted through the "RFE" link on the Sourceforge project page and they will be discussed when development on v1.2 starts. Unless a real show stopper rears its ugly head, I plan on beta 1 being the last release for about a month. This should allow enough time for everyone to poke at it and find the cracks. :) Thanks! John |