Le 07/02/2012 11:54, Giuseppe Aruta a écrit :
Sorry, it seems that 70 cm of snow creates some problem here in
Bologna, included to mails ;-)
Here is the original mail plus screenshot
---------------------------------------------------------
Hi all,
In the next months I am going to add some modifications on OpenJUMP
lower panel which I tested with external plugin.
1) the first one is modified version of CoordinateListMetrics.java
class. This class is activated by MultiClickTool class and displays
,on message panel, lenght, angle (between three adjacent vertices) and
area while drawing.
1a - As you can see on the screenshot - 1 the modified class shows:
Angle (between two adjacent lines), Azimuth, Total Length (length
between the two last vertices) and Area.
It also displays the units (degrees for angles and meter/sqr meter for
length/area).
some considerations about geodesy involved in this problem:
* If the map is in geographic coordinates (lat/lon), north is // to y
axis, which makes azimuth calculation easier, but distance
calculation difficult.
* If the map is in a projected coordinate system, azimuth can't be
precisely calculated without a deep knowledge of the projection
(grid convergence angle - see
http://w3.posc.org/GeoshareSIG/technical/GDM/v13.0/217-AZIMUTH-CORRECTION.php).
Not a reason to do nothing, but may need to warn the user, at least
in the wiki documentation.
1b - A future development of this class will use the option panel to
change Map Units and Measure Units to allows Users to switch between
metric units to other one (feet, surveyor feet or mile). I am still
study this second part of the project.
yes, may help to avoid confusions.
In the plugin architecture, it may worth thinking about how information
about the Coordinate Reference System or SRID can later be integrated to
have more accurate information and automatic switch between units.
Just ideas, I know this is a wide area where OpenJUMP is not really ready.
2) The second project is to add a scale on the lower panel (see also
screenshot - 2). I found two ways to do it:
You surely know that we already have a plugin (in view menu) which does
exacly that but which display the scale in the viewPanel.
What is the use case ?
Having feedback while changing the scale to adjust it to a certain
amount (I think that was what Matthias plugin wanted to achieve) ->
solution 1 may be enough
Or permanently display the scale -> solution 2 (looks like above
mentionned plugin)
my 2 cents
Michaël
2a - a "quick a durty way".
I basically add this code:
----------------------------------------------
public void mouseMoved(MouseEvent e) {
mouseLocationChanged(e);
getWorkbench().getFrame().setTimeMessage("1:" + (int)
Math.floor(ScreenScale.getHorizontalMapScale(panel.getViewport())));
}
----------------------------------------------
to plugin which are involved by the cursor: I successfully tested
with MultiClickTool.class and ZoomTool.class.
Moving the cursor users have always the view of the scale on TimePanel.
I am sure that this method works modifying general classes like
AbstractCursorTool and AbstractZoomTool - In these days I plan to do a
test about. The negative effects is that, until users don't move
cursor on the view, the changing scale is not activated
2b- a more "sophisticated way". I also inspected WorkbenchFrame class
and added a new JPanel "scaleLabel" to the left side of
coordinateLabel panel. The idea is to use this new bottom panel for
the scale and active it by default (like coordfinateLabel). This way
seems to me more reasonable but really more further to realize.
Right now I can do the modification 1a). But before doing this I like
to have the opinion of the other developers about all points.
Regards
Giuseppe
BTW, exploring WorkbenchFrame class I realize the presence of other
JPanels like wfsLabel and wmsLabel - which is then usages of these
panels"
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel