Re: [JPP-Devel] Charset choise

2010-09-07 Thread Sunburned Surveyor
Matthias,

I wonder if it might be worth checking out the current GeoTools code
for loading shapefiles, which already works with Charsets? I have done
some work on code that allows you to obtain JUMP feature objects from
th GeoTools shapefile driver.

It seems logical to store the last used charset with the project file.

Did we decide to set a default charset?

The Sunburned Surveyor

On Mon, Sep 6, 2010 at 3:01 PM, Matthias Scholz m...@jammerhund.de wrote:
 Hi Michaël,
 hi all other,

 sorry for my delay, but my internet connection was down at the weekend,
 so it was not possible for me to answer or commit any changes.

 1. Charset setting for filednames
 I've seen, that my enhanchements do not include the fieldnames in the
 dbf header. To integrate the charset stuff for the filednames I had to
 change some method signatures (add Charset parameter). Because I do not
 know how is using the methods, I have build the old  methods as a
 wrapper which is calling the new one with charset option. I hope thats
 the right way. As example please see the constructor of
 org.geotools.dbffile.DbfFile.
 In DbfFile I've removed the get/setCharset methods because the
 filednames will be read within the constructor(DbfFile-init-for() loop
 at the end). And to read the fieldnames with one charset, then set an
 other one and read the data with that makes no sense for me.


 2. Save dataset as shapefile with charset settings
 If we have an option while opening, we should have an equivalent one
 while saving. But the save mechanism is not so simple as the open
 wizard. So there are more code changes required.
 In org.geotools.dbffile.DbfFileWriter added charset stuff.
 In
 com.vividsolutions.jump.workbench.datasource.InstallStandardDataSourceQueryChoosersPlugIn.addFileDataSourceQueryChoosers()
 I've added a combobox for the charset if we saving shapefiles. I don't
 if this is the right place or if this is a little bit ugly. In the
 future we should go a uniform way for such options. For GML as example
 we have a separate installer plugin. I would suggest a kind of save
 wizard(as the open file wizard and FileLoader options) where you can add
 simply options for save.


 3. org.openjump.OpenJumpConfiguration
 I've changed the key of the charset option. Now we use a non localized
 key. This is better for saving in the project configuration. On the
 other hand in
 org.openjump.core.ui.plugin.file.open.SelectFileOptionsPanel.addIndividualSettingsFields()
 there is a nice mechanism for translating the option keys.  But this was
 not used/activated in line 168. I hope no one have a problem with the
 change in line 168.
 As a consquence I had to change the language key from
 org.openjump.core.ui.plugin.file.charset to
 org.openjump.core.ui.io.file.DataSourceFileLayerLoader.charset.


 4. org.openjump.core.ui.plugin.layer.LayerPropertiesPlugIn
 I've added the view of the charset settings, if the datasource is a
 shapefile.


 5. com.vividsolutions.jump.io.ShapefileReader
 In the read() method I've moved back the charset code outsite the if (
 mydbf == null ) brunch,
 for reading the fieldnames with charset. The new code is non-dbf save
 too. I do not know before, that Shape files without Dbf files are
 possible. This was a new fact for me ;-)
 The getDbfFile() method I had to change for reading the fieldnames with
 a charset.


 6. Save/restore charset setting to/from project configuration
 I had nothing to do for that. The Option mechanism for FileLayerLoaders
 in combination with the OpenFileWizard do this automatically, if you add
 an Option :-)


 Regards

 Matthias

   Hi Matthias,

 I just moved the setCharset statement of ShapefileReader after the dbf
 != null test, because otherwise it broke the reading of shapefiles
 without dbf (which is not a very common case, but still a nice feature)
 If you want to check, I just commited.

 Michaël

 Le 03/09/2010 23:50, Michaël Michaud a écrit :

    Hi Matthias,


 Can you give me some information about how it is supposed to work. Am I
 supposed to get a panel with a charset option for any shapefile loading ?

 Sorry for that question, I did not launch the new compiled version. I
 know get the charset choice dialog.

 Thanks,

 Michaël


 2) if we want to keep java 5 compatibility, you have to use new
 String(byte[], int, int, String) instead of new String(byte[], int, int,
 Charset) on line 264

 3) about your proposition of saving the charset in the project when
 different from default jvm charset : Seems a good idea to me.

 Michaël

 Le 03/09/2010 20:34, Matthias Scholz a écrit :

 Hi,

 sorry my mistake. I have it only tested with open and open recent ;-) In
 the SVN it is fixed for the first time, but there is a general question
 and I want to hear the other developers/users. If I open a shapefile
 with a special charset setting for the first time, it would be logic for
 me, if we save the charset setting for this file in the project. So if
 the user opens this file again with 

Re: [JPP-Devel] configurable cross-platform OJ launching

2010-09-07 Thread Sunburned Surveyor
I'm going to tinker with a bare bones Java launcher this week I hope.
I will let you know how it goes. I don't have a problem committing the
Mac launch script to the SVN.

The Sunburned Surveyor

On Sat, Sep 4, 2010 at 1:48 PM,  edgar.sol...@web.de wrote:

 - rework windows batch to be one file only again (less files for the user 
 to wonder about)
 Do you mean to remove lcp.bat ? I think new java version now understand 
 *.jar for the classpath definition (but maybe only from java 6 or even java 
 6.xx).

 just reintegrating lcp.bat logic into oj_win.bat, to have _one_ windows 
 script again


 PRO
 - virtually no work but more convenience for inexperienced users
 CONTRA
 - no generic configuration that works on every plattform
 OK, I think it's enough at the moment.

 I am comfortable with that

 PS : you probably know IzPack launcher which is used by many OpenSource 
 projects.

 actually no, so I'll have a look at it ...

 .. regards ede

 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] [openjump-users] Error message in Adjust selected side

2010-09-07 Thread Sunburned Surveyor
FYI:

I still think the nightly build is broken. The last time I saw a build
available for download was 2010-08-26. I'm going to try to get a build
of the current SVN up on the web today so people can try out some our
our latest changes/improvements.

The Sunburned Surveyor

On Mon, Aug 30, 2010 at 8:58 AM, Stefan Steiniger sst...@geo.uzh.ch wrote:
 yup, I think the update was after.

 Now there is no new snapshot since I added a library and things went wrong
 (I forgot to copy the lib to the maven repository). I hope I did fix it
 tonight and we have a new built tomorrow. If not, I need to ask the
 Intevation guys if they can check what is going wrong.

 sorry about that
 stefan

 Arnd Kielhorn schrieb:

 Thank You Larry for the info.
 I will load the next snapshot when it appears, test and report it.

 Arnd

 I think my update occurred after the snapshot was published.  I'm not
 quite
 sure when the next snapshot will appear...

 On Mon, Aug 30, 2010 at 9:57 AM, Arnd Kielhorn a.kielh...@gmx.de wrote:

 Hello Larry,

 I just tried the last snapshot

 snapshot-2010-08-26/    26-Aug-2010 02:12

 but with the same problem :-( as described before...



 BTW @stefan I cannot find the other new functions (for raster images and
 the 5 added statistic functions) as written in the changelogs. Do I have

 to

 edit the default-plugins.xml or workbench-properties?

 Kindly regards
 Arnd

 Hi Arnd,

  Have you tried the nightly snapshot since my update on 26 August?

 @anyone,  Has anyone else duplicated this problem using german (or

 other)

 language?

 Larry

 On Sat, Aug 28, 2010 at 1:37 AM, Arnd Kielhorn a.kielh...@gmx.de

 wrote:

 Hi Larry,

 that is exactly what I did also. When I than edit the value for

 length

 I

 get the error message (hope my translation is correct) Invalid

 Number

 Value

 (Length) one or more times after another by try to edit the value

 only

 one

 time. So I am not able to change the value.

 Tested systems:

 - Ubuntu 10.04 (32bit, JDK 1.6)
 - Ubuntu 9.04 (32bit, JRE 1.6)
 - Windows Vista (64bit, JRE 1.6)
 - Windows XP (32bit, JRE 1.6)

 Tested OJ releases:

 - official stable release
 - nightly snapshot 10.08.2010

 Kindly regards
 Arnd

 Hi Arnd,

  I need more information.  I have set my system language to

 german

 and

 still don't duplicate the problem.  Can you tell me exactly what

 you

 are

 doing to get the problem?  I'm starting with a new project,

 drawing a

 rectangle, selecting it, choosing Edit Selected Side, and changing

 the

 length.

 regards,

 Larry

 On Fri, Aug 27, 2010 at 9:58 AM, Arnd Kielhorn a.kielh...@gmx.de

 wrote:

 Hello,

 I just tested it also on Windows Vista and bring the same error,

 when

 the

 system language is german. There is no prblem, when I switched

 the

 system

 language to english.

 Arnd

 Right click on map view window.

 On Fri, Aug 27, 2010 at 9:48 AM, Sunburned Surveyor 
 sunburned.surve...@gmail.com wrote:

 Thanks for the help Larry.

 Just curioius, which menu entry is used to access this

 plug-in?

 I

 couldn't find it.

 The Sunburned Surveyor

 On Fri, Aug 27, 2010 at 2:32 AM, Arnd Kielhorn

 a.kielh...@gmx.de

 wrote:

 Thanks a lot Larry!

 I hope that I am not the only one who is using Linux (DE)

 and

 OpenJUMP

 so

 that a mix makes sense!

 Kindly regards
 Arnd

 Arnd,

  Try it out on tomorrow's nightly build.  I couldn't

 duplicate

 your

 problem
 (maybe Linux/DE specific), but I put in a fix for the

 most

 likely

 problem.

 regards,
 Larry

 On Thu, Aug 26, 2010 at 11:02 AM, Arnd Kielhorn

 a.kielh...@gmx.de

 wrote:

 Hi Larry,

 thanks for the reply.

 My productive OJ for every day work is an nightly build

 from

 10th

 April

 2010. But I tried also the last stable release and

 different

 other

 nightly

 builds. All with the same effect.

 Kindly regards
 Arnd

 Hi Arnd,

  I seem to remember fixing a non-english version bug

 in

 this

 code

 recently
 having to do with number separator formatting (comma

 vs.

 period).

  Are

 you

 using the nightly build or the last release?

 regards,
 Larry

 On Thu, Aug 26, 2010 at 9:46 AM, Arnd Kielhorn

 a.kielh...@gmx.de

 wrote:

 I just switched my system language from german to

 english

 and

 tried

 the

 function Edit selected side...and it works

 perfectly.

 Back under german language OJ do not let my edit

 the

 values

 for

 the

 sides

 but brings the error message Invalid Number Value

 (Length)

 and

 on

 the

 console appears what You can see below.

 Arnd

 Thank You, it will be nice.

 Could it be that the error causes on some special

 german

 characters

 in

 the

 context menu? Edit Selected Side is in the

 german

 translated

 version

 Ausgewählte Seite ändern.
 I do not know, it is my only idea at the moment.

 Kindly regards
 Arnd

 Arnd,

 I'll see if I can duplicate your error today.

 The Sunburned Surveyor

 On Wed, Aug 25, 2010 at 11:10 AM, Arnd Kielhorn

 a.kielh...@gmx.de

 wrote:

 I just 

Re: [JPP-Devel] System.out in code

2010-09-07 Thread Sunburned Surveyor
Stefan,

Do you have a problem with letting Kevin apply his patches to the
ImageFactory classes?

Would it be possible to set-up a simple log-to-file mechanism that
could be accessed from the plug-in context? I have used Log4j before,
and it seemed a little complicated. I wonder if just having the
ability to write messages to a simple plain-text log file would
suffice.

It seems better than sending output to System.Out.

I could create a patch for this simple logging system if people were
interested. Or, maybe there is another existing alternative to
System.Out in OJ and I am not thinking of it.

The Sunburned Surveyor

On Mon, Aug 30, 2010 at 9:38 AM, Stefan Steiniger sst...@geo.uzh.ch wrote:
 Hei,

 Here are a couple of questions:

 (1) Are the calls to System.out in plug-ins or the core?
 was the core

 (2) Does the information sent to System.out need to be reported to the
 user, and if not, what is the purpose of the logging?

 was needed because I wanted to see if the image drivers are loaded and I
 could not report the workbench since this is done before the workbench
 is available - but log4j may be even better



 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] Charset choise

2010-09-07 Thread edgar . soldin
On 07.09.2010 16:25, Sunburned Surveyor wrote:
 I wonder if it might be worth checking out the current GeoTools code
 for loading shapefiles, which already works with Charsets? I have done
 some work on code that allows you to obtain JUMP feature objects from
 th GeoTools shapefile driver.

I once did a geotools read/write extension. Maybe someone wants to update it to 
work with the latest geotools2?
http://soldin.de/about/2004-jump_plugins/

..ede

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] configurable cross-platform OJ launching

2010-09-07 Thread edgar . soldin
On 07.09.2010 16:30, Sunburned Surveyor wrote:
 I'm going to tinker with a bare bones Java launcher this week I hope.
 I will let you know how it goes. I don't have a problem committing the
 Mac launch script to the SVN.

I suggest you to have a look at
http://commons.apache.org/launcher/example.html

It looks like it can do everything we ask for a java based java launcher.

..ede

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] configurable cross-platform OJ launching

2010-09-07 Thread Sunburned Surveyor
Thanks,

I'm downloading the code now.

SS

On Tue, Sep 7, 2010 at 8:01 AM,  edgar.sol...@web.de wrote:
 On 07.09.2010 16:30, Sunburned Surveyor wrote:
 I'm going to tinker with a bare bones Java launcher this week I hope.
 I will let you know how it goes. I don't have a problem committing the
 Mac launch script to the SVN.

 I suggest you to have a look at
 http://commons.apache.org/launcher/example.html

 It looks like it can do everything we ask for a java based java launcher.

 ..ede

 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] System.out in code

2010-09-07 Thread Kevin Neufeld
  On 9/7/2010 7:38 AM, Sunburned Surveyor wrote:
 Stefan,

 ... I have used Log4j before,
 and it seemed a little complicated.

I find the log4j.properties variant complicated as well.  But the 
log4j.xml [1] configuration variant I find fairly straight forward [2].  
I can include/exclude log messages from particular java packages and log 
priorities.

 I wonder if just having the
 ability to write messages to a simple plain-text log file would
 suffice.


Which is one of many output appenders available to log4j :)  I agree, 
this is what I would recommend.  From user's perspective, one can submit 
the log file when posting a bug report.  We can even include a parameter 
in the JUMP launcher that would temporarily set the log priority to 
debug or even verbose to help with bug reports.

My 2 cents,
-- Kevin


[1] http://wiki.apache.org/logging-log4j/Log4jXmlFormat
[2] http://wiki.apache.org/logging-log4j/Log4jXmlFormat#Example_2

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] System.out in code

2010-09-07 Thread Sunburned Surveyor
I'll have to take a look at log4J again. Did you imagine exposing a
method to access the logging functionality through the plug-in
context, or through some other mechanism?

The Sunburned Surveyor

On Tue, Sep 7, 2010 at 8:29 AM, Kevin Neufeld kneuf...@refractions.net wrote:
  On 9/7/2010 7:38 AM, Sunburned Surveyor wrote:
 Stefan,

 ... I have used Log4j before,
 and it seemed a little complicated.

 I find the log4j.properties variant complicated as well.  But the
 log4j.xml [1] configuration variant I find fairly straight forward [2].
 I can include/exclude log messages from particular java packages and log
 priorities.

 I wonder if just having the
 ability to write messages to a simple plain-text log file would
 suffice.


 Which is one of many output appenders available to log4j :)  I agree,
 this is what I would recommend.  From user's perspective, one can submit
 the log file when posting a bug report.  We can even include a parameter
 in the JUMP launcher that would temporarily set the log priority to
 debug or even verbose to help with bug reports.

 My 2 cents,
 -- Kevin


 [1] http://wiki.apache.org/logging-log4j/Log4jXmlFormat
 [2] http://wiki.apache.org/logging-log4j/Log4jXmlFormat#Example_2

 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] Selectionstyle Patch

2010-09-07 Thread Sunburned Surveyor
Thanks Matthias. I was going to translate the English file, but sounds
like you've already done that.

Landon

On Mon, Sep 6, 2010 at 12:29 PM, Matthias Scholz m...@jammerhund.de wrote:
 Hi Landon,

 sorry for my delay, but my internet connection was down at the weekend :-(

 I've done the german and english translation in jump_de and
 jump_en.properties.

 Matthias
 I'll see if I can take a look at the English I18N file. Did you have
 English translations of the German words I can use? Or is the English
 file already done?

 The Sunburned Surveyor

 On Fri, Sep 3, 2010 at 6:12 AM, Larry Becker becker.la...@gmail.com wrote:

 Thanks for your patience Matthias.  Selection Style is a nice addition to
 OJ.

 regards,

 Larry

 On Fri, Sep 3, 2010 at 2:18 AM, Matthias Scholz m...@jammerhund.de wrote:

 Hi,

 just now I have commited my selection style changes. Thanks to Larry for
 his help!
 It would be nice if the language contributors can update the language
 files. I've only changed the german translation. The following keys must
 be changed:
 ui.plugin.OptionsPlugIn.selection-style
 ui.SelectionStyllingOptionsPanel.LineColor
 ui.SelectionStyllingOptionsPanel.PointStyle
 ui.SelectionStyllingOptionsPanel.PointSize
 ui.SelectionStyllingOptionsPanel.RestoreDefaultsSettings
 Please take look at the default jump.properties file.

 Now OJ have a new panel in the options, from where you can change the
 settings.

 Regards

 Matthias


 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel




 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel



 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] zooming to the last extent opening a project

2010-09-07 Thread Nils Kuhn
Hi all,
I am writing the extent of the viewport of the LayerViewPanel to a 
project-file while exiting OJ.  For setting the viewport to this extent 
again while opening that project I added a function zoomToLastLocation 
to the class 
com.vividsolutions.jump.workbench.ui.plugin.OpenProjectPlugIn. That 
method I am calling from method initialize in class 
com.vividsolutions.jump.workbench.ui.plugin.FirstTaskFramePlugIn.
Everything works fine but after zooming to the last extent from the 
project-file the viewport changes to the full extent of all loaded 
layers again.
Could anybody tell me where that's coded?
Regards Nils


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] zooming to the last extent opening a project

2010-09-07 Thread Larry Becker
Hi Nils,

  OJ has had the capability to restore the view at the time the project was
saved since February this year.  See JUMPWorkbench.main().

regards,

Larry

On Tue, Sep 7, 2010 at 11:47 AM, Nils Kuhn nils.k...@bws-gmbh.de wrote:

 Hi all,
 I am writing the extent of the viewport of the LayerViewPanel to a
 project-file while exiting OJ.  For setting the viewport to this extent
 again while opening that project I added a function zoomToLastLocation
 to the class
 com.vividsolutions.jump.workbench.ui.plugin.OpenProjectPlugIn. That
 method I am calling from method initialize in class
 com.vividsolutions.jump.workbench.ui.plugin.FirstTaskFramePlugIn.
 Everything works fine but after zooming to the last extent from the
 project-file the viewport changes to the full extent of all loaded
 layers again.
 Could anybody tell me where that's coded?
 Regards Nils



 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] question about getUltimateWrappee()

2010-09-07 Thread Michaël Michaud
  Hi Kevin,
 The FeatureCollectionWrapper.getUltimateWrappee() looks like this:

 public FeatureCollection getUltimateWrappee() {
  FeatureCollection currentWrappee = fc;
  while (currentWrappee instanceof FeatureCollectionWrapper) {
 currentWrappee = ((FeatureCollectionWrapper) currentWrappee).fc;
  }
  return currentWrappee;
 }

 Is there a reason line 66 references .fc directly instead of .getWrappee() ?
I have no idea. Did you try to find calls to this method in the whole 
source tree ?
Maybe also worthwhile to check in WFS plugin or other plugins which 
could use caching if this method is called.

Michaël

 For me this currently returns the wrong answer.  In the case of a
 CachingFeatureCollection, there are actually two FeatureCollections: the
 actual wrapped FC and a cached FC (a potentially small subset of the
 wrapped FC).  So, in this case, .fc references the cached FC, which is
 not the FC I'm actually after.

 I've overridden CachingFeatureCollection.getWrappee() in a custom
 variant to return the actual wrapped FC, which in my case is a custom
 DataStoreFeatureCollection that mimics a database table, not the cached
 FC subset.


 -- Kevin

 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Jump-pilot-devel mailing list
 Jump-pilot-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel




--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] [openjump-users] Error message in Adjust selected side

2010-09-07 Thread edgar . soldin
On 07.09.2010 21:13, Sunburned Surveyor wrote:
 If someone sends me the required files for launching OJ on the Mac,
 I'll get them in the nightly build release I am preparing.

In the course of making the gps extension working on different plattforms I 
checked and extended the linux script. Created a script for OSX. Did you read 
the '[JPP-Devel] configurable cross-platform OJ launching' thread? Suggestion 
was:

 A) script model

 TODO
 - new user-friendly script names (oj_win.bat,oj_linux.sh,oj_mac.command)
 - adding a mac script which essentially calls the linux shell script (see 
 attachement, it's tested on OSX 10.410.6 should I put it in the svn?)
 - rework windows batch to be one file only again (less files for the user to 
 wonder about)

To go on with this I would suggest (what's still todo)
- testing the new linux script by second party, who is willing?
- testing on OSX 10.4 and 10.6 (of the recent changes)
then continue with the renamed scripts for the new release.

I could actually put them on the svn, when they are stable, my rights should be 
sufficient.

regards ede


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] System.out in code

2010-09-07 Thread Michaël Michaud
  Hi,

Of course, I agree with Martin's solution to report bad features in a 
dedicated layer.

Ede also reminded us about the HTMLFrame, which may not be well suited 
to report geometry problems, but which is the way to go for other 
information messages directed to the user (ex. statistics, explanations 
about the problem encountered, advice to solve it...). The use of 
HTMLFrame looks like the use of logging, except messages in HTMLFrame 
are directed to the user, and logging messages are directed to developpers.

I understand also your concern about degenerated geometries as I tried 
to solve such a case during the reading of degenerated shapefiles (I did 
not choose to create a new layer for that, but it could have been a good 
solution). To be able to report geometries which are 1) readable by 
OpenJUMP and 2) similar to the original geometry, I choosed to change 
the geometry type (ex. a degenerated polygon with less than 4 points can 
be shown as a linestring without loosing much information)

my 2 cents

Michaël



Le 07/09/2010 22:00, Sunburned Surveyor a écrit :
 OK. Thanks Martin.

 The only question I had about this method was the possiblity of a
 corrupt feature. It the plug-in is processing a layer with a corrupt
 feature, trying to add it to another layer could throw an exception,
 which is what I am trying to avoid. I suppose all the features the
 plug-in is operating on could already be in an existing layer, unless
 the plug-in is creating new features during a data import. That could
 create a situation in which trying to report the problem with the bad
 feature creates another problem when you try to add it to the layer
 that stores problem features.

 I'll see if there is an elegant way to handle this edge case. It won't
 be an issue with the Union By Attribute plug-in, as both input layers
 already exist in the project.

 At any rate, when I get done with my UnionByAttribute plug-in mods,
 I'll try to add a short article to the wiki so other plug-in
 programmers can use the same technique to skip problem features and
 write them to a new layer. I think this method of plug-in processing
 makes plug-ins more robust. They also make it easier to identify
 problem data. That was the whole point of my tweaking, as Nacho and I
 couldn't figure out what feature in his data was causing the Union By
 Attribute plug-in to choke in the first place.

 The Sunburned Surveyor

 On Tue, Sep 7, 2010 at 12:57 PM, Martin Davismbda...@refractions.net  wrote:
   Landon,

 My 2c worth on this is that you should write the problem features to a
 new layer.  I used that approach quite a bit in JCS development, and it
 worked well.  With features in a layer it makes them easy to visualize,
 and the user can use all the tools already in OJ to examine and/or fix
 the problems.

 Martin

 On 9/7/2010 12:29 PM, Sunburned Surveyor wrote:
 Kevin,

 Thanks for the clarification. I agree that since the project is
 already has Log4J as a dependency, we should use it to replace the
 System.out statements in the core.

 I was thinking about plug-in developers as well. I'm working on the
 Union By Attribute plug-in. I'm tweaking it to report and skip problem
 features during execution. I had originally thought about writing the
 problem features to a new layer, but another reasonable solution would
 be to write the WKT for the feature with some type of error message to
 a log file. I thought it would be good to have all plug-ins report
 problems of this type to the same log file, possibly using a class
 accessed through the plug-in context. We might have a PlugInReporter
 class with methods like reportPlugInExecutionProblem(String
 errorMessage) or reportProblemData(ListFeatureproblemFeatures).

 I thought the implementation of this class might use Log4J in the way
 you describe.

 I'm just thinking out loud. I need to consider the problem more
 carefully before I come up with a solution. I will keep Log4J in mind
 when I work on the logging implementation.

 In the meantime, I'll add replacing those 300+ System.out calls with a
 Log4J technique to my to do list. I've printed out an article on Log4J
 so I can learn some more about how it works.

 The Sunburned Surveyor
 On Tue, Sep 7, 2010 at 11:14 AM, Kevin Neufeldkneuf...@refractions.net
 wrote:
Hi Landon,

 I'm not sure I understand your question, sorry.  I'm not suggesting to
 expose any method to access logging functionality.

 I hope this makes this more clear:
 What I'm suggesting is that the 330 calls to System.out currently in src
 get cleaned up, replaced with appropriate log4j calls.

 ie.
 System.out.println(Starting OpenJUMP);
 logger.info(Starting OpenJUMP);

 System.out.println(Entering my private method);
 logger.debug(Entering my private method);

 System.out.println(Should never reach here !!!);
 logger.fatal(Should never reach here !!!, exception);


 Log4j then needs a configuration defined so it knows where to output the
 log statements,