Re: [JPP-Devel] Generate file of tracings (Persona lized Feature Layers)
Hi Hernan, I don't know if I am understanding your intention correctly, but I think you are mixing some things: Points, polylines and polygons are geometries you can store in the geometry-attribute of a feature. All these features (with mixed geometry-types) you can store in one FeatureCollection and save them in the filesystem, e.g. as GML or WKT or in a PostgreSQL/PostGIS-table with OpenJUMP. The symbology and text elements you don't have to digitalize to the map: they can be based on any attribute of the FeatureSchema of the Features in your FeatureCollection. Regards, Nils Hernan Arellano schrieb: Hi guys! I need to generate a file of tracings (like a feature layer), this file must contain distint shapes like points, lines, poligons, symbology, and text, all these shapes drawed by user on a map. I know that to do this, I need to generate a new FLayer for each kind of shape and draw on it, so my file of tracings will has 5 Flayer. 1) To generate distint styles for each shape inside the same FLayer, i will use ColorThemingStyle with value attribute selected by user. is it correct or there is a better way? 2) Is there already any plugins to do "file of tracings" that I need? if not, once my plugin is terminated i want to share it with all of you! Thanks, Regards! Hernan. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Development - OpenJUMP
Hi Benjamin, Are you running Groovy from within OJ as we do BeanScript and Jython, or are you importing the OJ classes to create Groovy programs? Larry On Wed, Jun 2, 2010 at 9:43 AM, Benjamin Gudehus hasteb...@googlemail.comwrote: Hi! I wrote a FeatureCollectionBuilder and a FeatureCollectionSchemaEditor for that in Groovy using the Builder design pattern ( http://groovy.codehaus.org/Builders). Look at this example code (from the unit tests). You can add and remove Attributes to the FeatureSchema. pre private featureCollection def setup() { this.featureCollection = new FeatureCollectionBuilder().build { schema { attribute(id, AttributeType.INTEGER) attribute(name, AttributeType.STRING) } features { feature(id: 1, name: foo) feature(id: 2, name: bar) feature(id: 3, name: baz) feature(id: 4, name: quux) } } } def Add an attribute to the FeatureSchema() { when: def collectionEditor = new FeatureCollectionSchemaEditor(this.featureCollection) collectionEditor.modifySchema { addSchemaAttribute(street, AttributeType.STRING) } then: def newFeatureSchema = collectionEditor.getFeatureCollection().getFeatureSchema() collectionEditor.getAttributeNames(newFeatureSchema) == [id, name, street] } /pre If somebody wants to use it, I can upload the sourcecode (but it depends on the groovy jar). 2010/6/2 Larry Becker becker.la...@gmail.com For tips on how to do this see: http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=Extending_a_FeatureCollection_by_Adding_new_Attributes On Wed, Jun 2, 2010 at 9:17 AM, Larry Becker becker.la...@gmail.comwrote: Hi Caroline, You seem to be making progress on your project. Your current problem is that when you alter a schema it only affects new features. You need to replace the old schema in each feature with the new one before copying attributes. regards, Larry 2010/6/2 Caroline Julliê Freitas Ribeiro krolj...@gmail.com I tried to put a new attribute to a old Feature, I altered the Schema but looks like the size of the array whete stay the data of the Feature is not actualized. I got the following Stack trace: java.lang.ArrayIndexOutOfBoundsException: 3 at com.vividsolutions.jump.feature.BasicFeature.getAttribute(BasicFeature.java:82) at com.vividsolutions.jump.workbench.ui.LayerTableModel$4.getValue(LayerTableModel.java:170) at com.vividsolutions.jump.workbench.ui.LayerTableModel$MyColumn.getValueAt(LayerTableModel.java:75) at com.vividsolutions.jump.workbench.ui.ColumnBasedTableModel.getValueAt(ColumnBasedTableModel.java:141) at com.vividsolutions.jump.workbench.ui.GUIUtil.chooseGoodColumnWidths(GUIUtil.java:408) at com.vividsolutions.jump.workbench.ui.AttributeTablePanel.initColumnWidths(AttributeTablePanel.java:415) at com.vividsolutions.jump.workbench.ui.AttributeTablePanel.init(AttributeTablePanel.java:307) at com.vividsolutions.jump.workbench.ui.AttributePanel.addTablePanel(AttributePanel.java:154) at com.vividsolutions.jump.workbench.ui.AttributePanel.layerAdded(AttributePanel.java:136) at com.vividsolutions.jump.workbench.ui.AttributeTab$5.layerAdded(AttributeTab.java:143) at com.vividsolutions.jump.workbench.ui.InfoModel.add(InfoModel.java:88) at com.vividsolutions.jump.workbench.ui.cursortool.FeatureInfoTool.gestureFinished(FeatureInfoTool.java:81) at com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool.fireGestureFinished(AbstractCursorTool.java:446) at com.vividsolutions.jump.workbench.ui.cursortool.SpecifyFeaturesTool.mouseClicked(SpecifyFeaturesTool.java:95) at com.vividsolutions.jump.workbench.ui.cursortool.LeftClickFilter.mouseClicked(LeftClickFilter.java:81) at com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool.mouseClicked(DelegatingTool.java:97) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253) at java.awt.Component.processMouseEvent(Component.java:6266) at javax.swing.JComponent.processMouseEvent(JComponent.java:3255) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at
Re: [JPP-Devel] Development - OpenJUMP
That's how the sentences supposed to look like. - ...with Eclipse (using the amazing Groovy-Eclipse Plugin). NetBeans and IntelliJ IDEA also support Groovy. ... 2010/6/3 Benjamin Gudehus hasteb...@googlemail.com 2010/6/3 Larry Becker becker.la...@gmail.com Hi Benjamin, Are you running Groovy from within OJ as we do BeanScript and Jython, or are you importing the OJ classes to create Groovy programs? I use Groovy the same way as you use Java (importing the OJ classes). I put groovy-all-1.7.0.jar (ca. 5 MB) into OpenJUMP's /lib directory and develop OJ plugins with Eclipse (using the amazing Groovy-Eclipse Plugin, NetBeans and IntelliJ IDEA). You can use Java classes in Groovy classes and vice versa (Groovy files are compiled into .class files). Thus you can even use Groovy classes from the BeanShell or Jython. Since my two classes (mentioned previously) require Groovy Closures as method parameters, it is necessary to call their methods within a groovy file (these two classes are special cases). Here is a HelloWorldPlugIn in Groovy: pre import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn import com.vividsolutions.jump.workbench.plugin.PlugInContext import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller class HelloWorldPlugIn extends AbstractPlugIn { void initialize(PlugInContext pluginContext) {} boolean execute(PlugInContext pluginContext) { def pluginPath = pluginContext.getWorkbenchContext().getWorkbench(). getPlugInManager().getPlugInDirectory().getAbsolutePath() def htmlFrame = pluginContext.getWorkbenchFrame().getOutputFrame() htmlFrame.setTitle(Hello, World!) htmlFrame.createNewDocument() htmlFrame.addText(Hello, World!) htmlFrame.addText(pluginPath.toString()) htmlFrame.surface() return true } } /pre Another funny thing is, you can copy your Java code into a Groovy file and it compiles. --Benjamin Larry On Wed, Jun 2, 2010 at 9:43 AM, Benjamin Gudehus hasteb...@googlemail.com wrote: Hi! I wrote a FeatureCollectionBuilder and a FeatureCollectionSchemaEditor for that in Groovy using the Builder design pattern ( http://groovy.codehaus.org/Builders). Look at this example code (from the unit tests). You can add and remove Attributes to the FeatureSchema. pre private featureCollection def setup() { this.featureCollection = new FeatureCollectionBuilder().build { schema { attribute(id, AttributeType.INTEGER) attribute(name, AttributeType.STRING) } features { feature(id: 1, name: foo) feature(id: 2, name: bar) feature(id: 3, name: baz) feature(id: 4, name: quux) } } } def Add an attribute to the FeatureSchema() { when: def collectionEditor = new FeatureCollectionSchemaEditor(this.featureCollection) collectionEditor.modifySchema { addSchemaAttribute(street, AttributeType.STRING) } then: def newFeatureSchema = collectionEditor.getFeatureCollection().getFeatureSchema() collectionEditor.getAttributeNames(newFeatureSchema) == [id, name, street] } /pre If somebody wants to use it, I can upload the sourcecode (but it depends on the groovy jar). 2010/6/2 Larry Becker becker.la...@gmail.com For tips on how to do this see: http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=Extending_a_FeatureCollection_by_Adding_new_Attributes On Wed, Jun 2, 2010 at 9:17 AM, Larry Becker becker.la...@gmail.comwrote: Hi Caroline, You seem to be making progress on your project. Your current problem is that when you alter a schema it only affects new features. You need to replace the old schema in each feature with the new one before copying attributes. regards, Larry 2010/6/2 Caroline Julliê Freitas Ribeiro krolj...@gmail.com I tried to put a new attribute to a old Feature, I altered the Schema but looks like the size of the array whete stay the data of the Feature is not actualized. I got the following Stack trace: java.lang.ArrayIndexOutOfBoundsException: 3 at com.vividsolutions.jump.feature.BasicFeature.getAttribute(BasicFeature.java:82) at com.vividsolutions.jump.workbench.ui.LayerTableModel$4.getValue(LayerTableModel.java:170) at com.vividsolutions.jump.workbench.ui.LayerTableModel$MyColumn.getValueAt(LayerTableModel.java:75) at com.vividsolutions.jump.workbench.ui.ColumnBasedTableModel.getValueAt(ColumnBasedTableModel.java:141) at com.vividsolutions.jump.workbench.ui.GUIUtil.chooseGoodColumnWidths(GUIUtil.java:408) at com.vividsolutions.jump.workbench.ui.AttributeTablePanel.initColumnWidths(AttributeTablePanel.java:415) at com.vividsolutions.jump.workbench.ui.AttributeTablePanel.init(AttributeTablePanel.java:307) at
Re: [JPP-Devel] Development - OpenJUMP
2010/6/3 Larry Becker becker.la...@gmail.com Hi Benjamin, Are you running Groovy from within OJ as we do BeanScript and Jython, or are you importing the OJ classes to create Groovy programs? I use Groovy the same way as you use Java (importing the OJ classes). I put groovy-all-1.7.0.jar (ca. 5 MB) into OpenJUMP's /lib directory and develop OJ plugins with Eclipse (using the amazing Groovy-Eclipse Plugin, NetBeans and IntelliJ IDEA). You can use Java classes in Groovy classes and vice versa (Groovy files are compiled into .class files). Thus you can even use Groovy classes from the BeanShell or Jython. Since my two classes (mentioned previously) require Groovy Closures as method parameters, it is necessary to call their methods within a groovy file (these two classes are special cases). Here is a HelloWorldPlugIn in Groovy: pre import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn import com.vividsolutions.jump.workbench.plugin.PlugInContext import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller class HelloWorldPlugIn extends AbstractPlugIn { void initialize(PlugInContext pluginContext) {} boolean execute(PlugInContext pluginContext) { def pluginPath = pluginContext.getWorkbenchContext().getWorkbench(). getPlugInManager().getPlugInDirectory().getAbsolutePath() def htmlFrame = pluginContext.getWorkbenchFrame().getOutputFrame() htmlFrame.setTitle(Hello, World!) htmlFrame.createNewDocument() htmlFrame.addText(Hello, World!) htmlFrame.addText(pluginPath.toString()) htmlFrame.surface() return true } } /pre Another funny thing is, you can copy your Java code into a Groovy file and it compiles. --Benjamin Larry On Wed, Jun 2, 2010 at 9:43 AM, Benjamin Gudehus hasteb...@googlemail.com wrote: Hi! I wrote a FeatureCollectionBuilder and a FeatureCollectionSchemaEditor for that in Groovy using the Builder design pattern ( http://groovy.codehaus.org/Builders). Look at this example code (from the unit tests). You can add and remove Attributes to the FeatureSchema. pre private featureCollection def setup() { this.featureCollection = new FeatureCollectionBuilder().build { schema { attribute(id, AttributeType.INTEGER) attribute(name, AttributeType.STRING) } features { feature(id: 1, name: foo) feature(id: 2, name: bar) feature(id: 3, name: baz) feature(id: 4, name: quux) } } } def Add an attribute to the FeatureSchema() { when: def collectionEditor = new FeatureCollectionSchemaEditor(this.featureCollection) collectionEditor.modifySchema { addSchemaAttribute(street, AttributeType.STRING) } then: def newFeatureSchema = collectionEditor.getFeatureCollection().getFeatureSchema() collectionEditor.getAttributeNames(newFeatureSchema) == [id, name, street] } /pre If somebody wants to use it, I can upload the sourcecode (but it depends on the groovy jar). 2010/6/2 Larry Becker becker.la...@gmail.com For tips on how to do this see: http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=Extending_a_FeatureCollection_by_Adding_new_Attributes On Wed, Jun 2, 2010 at 9:17 AM, Larry Becker becker.la...@gmail.comwrote: Hi Caroline, You seem to be making progress on your project. Your current problem is that when you alter a schema it only affects new features. You need to replace the old schema in each feature with the new one before copying attributes. regards, Larry 2010/6/2 Caroline Julliê Freitas Ribeiro krolj...@gmail.com I tried to put a new attribute to a old Feature, I altered the Schema but looks like the size of the array whete stay the data of the Feature is not actualized. I got the following Stack trace: java.lang.ArrayIndexOutOfBoundsException: 3 at com.vividsolutions.jump.feature.BasicFeature.getAttribute(BasicFeature.java:82) at com.vividsolutions.jump.workbench.ui.LayerTableModel$4.getValue(LayerTableModel.java:170) at com.vividsolutions.jump.workbench.ui.LayerTableModel$MyColumn.getValueAt(LayerTableModel.java:75) at com.vividsolutions.jump.workbench.ui.ColumnBasedTableModel.getValueAt(ColumnBasedTableModel.java:141) at com.vividsolutions.jump.workbench.ui.GUIUtil.chooseGoodColumnWidths(GUIUtil.java:408) at com.vividsolutions.jump.workbench.ui.AttributeTablePanel.initColumnWidths(AttributeTablePanel.java:415) at com.vividsolutions.jump.workbench.ui.AttributeTablePanel.init(AttributeTablePanel.java:307) at com.vividsolutions.jump.workbench.ui.AttributePanel.addTablePanel(AttributePanel.java:154) at com.vividsolutions.jump.workbench.ui.AttributePanel.layerAdded(AttributePanel.java:136) at
Re: [JPP-Devel] OpenJump
Wow, that's very impressive. As you say, what is it getting used for? My JTS experience is that I'm constantly getting surprised at the places that it pops up that I have never heard about. JTS is a bit different to OJ, though, in that it's a developer tool rather than an end-user tool. I'd actually expect to hear more from OJ users, since they might be a bit less willing to read the code and figure it out for themselves. Stefan Steiniger wrote: thanks Michael for answering as a note, we had altogether about 12'000 downloads of OpenJUMP 1.3.1 for windows and as zip in the past 6 months. Which makes 2000/month and is more than one year ago where we had about 1200/month. Now - what are all these people doing with OJ? ;) our list stats: jpp devel: 119 subscribers openjump users: 125 subscribers (of which 1-2 emails are backups) -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] Exposing JUMP as an RMI service?
It occurred to me recently that it might be useful to have a spatial viewer acting as an RMI service for out-of-process or remote clients. A possible use case would be as a spatial logger - a client process could log spatial data generated during the course of execution which would be immediately viewable in the spatial viewer. The neat thing is that this would work during a debug session, so the developer could get a good view of data being processed during the run. For those not familiar with it, RMI makes it almost trivially easy to expose a service endpoint and communicate with it from other Java processes. It would be fairly simple to expose a service that allowed clients to create layers, add features to layers, etc. Really the service could expose almost anything that can be manipulated in JUMP). It would thus enable a sort of remote plugin facility. I also envision a very simple client API that hid the (fairly trivial) aspects of connecting to an RMI service. This may be a solution in search of a problem - but RMI is so powerful it seems like there must be some applications for it. Has anyone played around with exposing an RMI service from JUMP? -- Martin Davis Senior Technical Architect Refractions Research, Inc. (250) 383-3022 -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel