[JPP-Devel] Just pure curiostity

2010-07-14 Thread Helmut Seidel M.A.
Hello everybody,

after I messed around with some homemade perl an c-code I finally 
started to develop plugins with openJump.

But still out of pure curiosity (I'm woring as a university teacher - 
that's where my curiosity comes from) I wonder how can Layers be loaded 
so fast - It took minutes in my perl/C-Application. So I have two questions:

* what are the logical steps you go through to read and display a, lets 
say, shape file - I tried it the way I read an item and display it in my 
widget - but that's painfully slow.
* Which portions of code must I look into, to see how it's done.

Thank you for your help and regards

Helmut

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] MeasureTool change

2010-07-14 Thread Stefan Steiniger
Hei,

what would be the effect for you (area calculations?)? Will everything 
else still work?

However, I committed it.


Matthias Scholz wrote:
> Hi,
> 
> is it possible, that anyone of the commiters can make the following
> little change in
> com.vividsolutions.jump.workbench.ui.cursortool.MeasureTool?
> Add "setCloseRing(true);" to the Constructor, so that the user see the
> closed polygon. Currently, some users of mine a little confused.
> 
> Thank You
> 
> Matthias
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 
> 

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] MeasureTool change

2010-07-14 Thread Stefan Steiniger
mhm.. don't know after testing (It's still committed) - but now people 
who want to measure line distance may be confused?

any opinions by others?

stefan

Stefan Steiniger wrote:
> Hei,
> 
> what would be the effect for you (area calculations?)? Will everything 
> else still work?
> 
> However, I committed it.
> 
> 
> Matthias Scholz wrote:
>> Hi,
>>
>> is it possible, that anyone of the commiters can make the following
>> little change in
>> com.vividsolutions.jump.workbench.ui.cursortool.MeasureTool?
>> Add "setCloseRing(true);" to the Constructor, so that the user see the
>> closed polygon. Currently, some users of mine a little confused.
>>
>> Thank You
>>
>> Matthias
>>
>> --
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> ___
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 
> 

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] Development with OpenJUMP

2010-07-14 Thread Stefan Steiniger
the best way to see what GUI function is related to what class/plugin is 
to use the translation/languages files (search for the string) and check 
then the classpath

e.g. searching for "Feature Info Tool" in "jump_en.properties" will 
result in:
com.vividsolutions.jump.workbench.ui.cursortool.FeatureInfoTool

now you can checkout what happens on gestureFinished()

or if your class is a Plugin class, then you check out what happens in 
"run" or "execute"

stefan

Caroline Julliê Freitas Ribeiro wrote:
> Hi,
> 
> I had progress in my project: In OpenJUMP, my plugin extracts data from 
> database of Legacy
> Systems, it's importing the data from database to the respective 
> geographical
> object of Layer through association of a field in database with the 
> feature's attribute, feeding the data in GIS.
> 
> I need call the window of Edit/View Attribute to show the changes. How do 
> it? I want show the "Feature Info Tool" to view attribute 
> 
> 
> -- 
> Caroline Julliê de Freitas Ribeiro
> Graduando em Análise e Desenvolvimento de Sistemas
> 
> Instituto Federal Minas Gerais - IFMG
> Campus Bambuí
> 
> 
> 
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> 
> 
> 
> 
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] how to refresh a layer in run time

2010-07-14 Thread Stefan Steiniger

Hei Elton,

my experimental code is attached. But not sure if it helps you.
on vi.. maybe you have to apply the style? or the trick is done by 
firing the layer-changed event? haven't tested.


stefan

Elton Chan wrote:

Hi Stefan,

Could you send me your code for my testing as I would like to see how do you 
update the layerpanel according to order and then update the layerpanel.

BTW, following are conditions for my case.
i. all features to be displayed are stored in one polygon layer;
ii. all features will be displayed at any time step;
iii. For each time step, an attribute that controls feature's color would be 
updated from an event table. The event table stores order, polygon id and color 
code.
iv. After color is updated for all features, it will be shown on the layerpanel.

However, the problem I encountered is at step iv. that althrough the attribute 
can be updated without problem, it cannot be shown/refresh on the layerpanel.

For your case, I wonder if you could create a sql query to retrieve particular 
feature and display at a time. (assume you are using postgis)

Thanks,
Elton

--- On Tue, 7/13/10, Stefan Steiniger  wrote:


From: Stefan Steiniger 
Subject: Re: [JPP-Devel] how to refresh a layer in run time
To: "OpenJump develop and use" 
Date: Tuesday, July 13, 2010, 12:15 AM
mhm.. not really a solution.

I assume that
- all features to be displayed are stored in one layer
- only one(!) feature needs to be displayed at a time step
- one attribute of the layer has the information about the
the order the 
features are to be displayed.


Then I just display the features after each other by
modifying the 
FeatureCollection of the Layer.


Of course I can send the code if someone wants to see/use
it.

So, quite a bit of assumptions which works for my special
case - seing 
how a bear home range evolves over time with the number of
new GPS 
points collected (a home range is a polygon or a multi
polygon and I 
have almost as much polygons as GPS point).


stefan

Larry Becker schrieb:

Hi Elton,

   Make your loop variable a class
variable.  Have the loop control and 

attribute update inside the event handler.  While
the loop is still 

going invoke the event handler again, also from within
the event 

handler.  Once you have set up the event handler
and invoked it once, 

just fall off the end of the execute routine.  I
would give an example,  

but I'm away from my development system.

   It sounds like Stefan also has a need
for animation.  Perhaps he will 

show you his solution.

Larry

On Fri, Jul 9, 2010 at 10:41 PM, Elton Chan mailto:elton.c...@yahoo.com>>

wrote:

 Dear Larry,

 Could you tell me how it

works? It seems a loop is required for

 continous update an attribute.

How can it be replaced by a event

 handler?

 Thanks,
 Elton


 --- On *Fri, 7/2/10, Larry

Becker /
 >/*

wrote:


 From: Larry

Becker 
 >
 Subject: Re:

[JPP-Devel] how to refresh a layer in run time

 To: "OpenJump

develop and use"

 mailto:jump-pilot-devel@lists.sourceforge.net>>
 Date: Friday,

July 2, 2010, 5:33 PM


 Hi Elton,

   I think

you are going to have to restructure you code from a

 loop to be an

event handler that triggers itself until the end

 of some

counter.  That is the only sure way to play nice with

 the GUI.

 Larry

 On Fri, Jul 2,

2010 at 12:06 PM, Elton Chan

 http://mc/compose?to=elton.c...@yahoo.com>>

wrote:

 Hi

Larry,
 

   I've tried the LayerView Panel().repaint()
with
 

   InvokeAndWait(). However, the layerpanel
still cannot refesh
 

   and the for loop continues until all
finishing all the
 

   Recordset.
 

   The following code is added after
attribute update:

 if

(SwingUtilities.isEventDispatchThread()) {
   
 
   context.getLayerViewPanel().repaint();
   
 
   System.out.println("repaint!!");

 Always
 

   hit this line.
   

 }
   

 else {
   
 
   SwingUtilities.invokeAndWait(new Runnable(

) {
   
 
   public void run( ) {
   
   
 
   context.getLayerViewPanel().repaint();
   
   
 System.out.println("repaint!!!");
   

}
   

 });
   

 }
 

   Any idea?


 

   --- On *Thu, 7/1/10, Larry Becker / 

   >/*
wrote:


 

   From: Larry Becker  

   >
 

   Subject: Re: [JPP-Devel] how to refresh a
layer in run time
 

   To: "OpenJump develop and use"
 

   

Re: [JPP-Devel] How to import a table of polygons

2010-07-14 Thread Stefan Steiniger
Hei Peppe,

I have a tool too, which creates lines from points if an attribute is 
given that can be used for ordering (well.. assuming that you load the 
data in the correct order you could just create a new attribute and 
assign numbers in order).

However, that would just create a line from all points, as there needs 
to be an indicator where the line is finished and a new started.

Getting polygons out of lines is simple with the planar graph function - 
more or less.

stefan

Giuseppe Aruta wrote:
> Hi London,
> thanks for your answer.ù
> Really I fegure out I can do it using a spreadsheet.
> The basic work is to transform, for instance,  a line coordinates: 0,0 0,2 
> 2,2 2,0 0,0 into a wkt string: Polygon ((0,0 0,2 2,2 2,0 0,0)). This is not 
> difficult but sometimes confusing and long.
> It would be interesting to explore a way that involve OJ directly using table 
> 
> regards
> 
> Peppe
> 
> P.S. Francisco Helguera from SAIG wrote me that Kosmo has a "Get
> lines from points" tool that should work - but no import table.
> 
> --- Lun 12/7/10, Sunburned Surveyor  ha scritto:
> 
>> Da: Sunburned Surveyor 
>> Oggetto: Re: [JPP-Devel] How to import a table of polygons
>> A: "OpenJump develop and use" 
>> Data: Lunedì 12 luglio 2010, 17:14
>> Peppe,
>>
>> You'd have to specify the start and end of each LineString
>> or Polygon
>> in the point file. So you'd need more than just points,
>> you'd need
>> some other mark-up to.
>>
>> The text delimited point importer I built is made to
>> separate out a
>> "linework code". Surveying software typically uses the
>> linework code
>> input by the field surveyor to automatically generate
>> linework. I
>> haven't bolted this functionality on to my point import
>> tool, but it
>> can be done.
>>
>> The Sunburned Surveyor
>>
>> On Mon, Jul 12, 2010 at 6:16 AM, Giuseppe Aruta 
>> wrote:
>>> Hi all,
>>> tecnically Openjump/Skyjump and Kosmo have many
>> strategies to import a set of coordinates as points, either
>> using WKT structures or via tables.
>>> I just wonder if it is possible to import a set of
>> coordinates (as table) and create directly  lines, closed
>> lines or polygons.
>>> Or to load  a point layer and convert them to a line
>> layer
>>> I checked around and I cannot find anything but
>> digitalizing.
>>> I thank for the answers
>>>
>>> Giuseppe Aruta
>>>
>>>
>>>
>>>
>>>
>> --
>>> This SF.net email is sponsored by Sprint
>>> What will you do first with EVO, the first 4G phone?
>>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>>> ___
>>> Jump-pilot-devel mailing list
>>> Jump-pilot-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>
>> --
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> ___
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
> 
> 
>   
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 
> 

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] MeasureTool change

2010-07-14 Thread Matthias Scholz
Hi Stefan,

I agree you from your point of view (measure of lines), but my point of 
view was for measure of areas. So i think the measurement tool should be 
extended in the future. If I compare the OJ measure tool with other GIS, 
then I see some mistakes and possibilities to improve OJ.

Matthias
> mhm.. don't know after testing (It's still committed) - but now people 
> who want to measure line distance may be confused?
>
> any opinions by others?
>
> stefan
>
> Stefan Steiniger wrote:
>   
>> Hei,
>>
>> what would be the effect for you (area calculations?)? Will everything 
>> else still work?
>>
>> However, I committed it.
>>
>>
>> Matthias Scholz wrote:
>> 
>>> Hi,
>>>
>>> is it possible, that anyone of the commiters can make the following
>>> little change in
>>> com.vividsolutions.jump.workbench.ui.cursortool.MeasureTool?
>>> Add "setCloseRing(true);" to the Constructor, so that the user see the
>>> closed polygon. Currently, some users of mine a little confused.
>>>
>>> Thank You
>>>
>>> Matthias
>>>
>>> --
>>> This SF.net email is sponsored by Sprint
>>> What will you do first with EVO, the first 4G phone?
>>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>>> ___
>>> Jump-pilot-devel mailing list
>>> Jump-pilot-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>
>>>
>>>   
>> --
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> ___
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>
>> 
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>   


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel