Re: [JPP-Devel] Select shape by attribute
Hi Helmut, try the following (without any guarantee): //iterate over the features of your layer, select some of them by attribute and build an envelope including all the geometries of the features to select Layer lyr = context.getLayerManager().getLayer("yourLayer"); FeatureCollectionWrapper fcw = lyr.getFeatureCollectionWrapper(); List features = fcw.getFeatures(); Envelope envToZoomTo=new Envelope(); for (Feature feature : features) { if (feature.getString("YourAttribute").equalsIgnoreCase("theValueTheFeaturesToSelectShouldHave")) { context.getLayerViewPanel().getSelectionManager().getFeatureSelection().selectItems(lyr, feature); envToZoomTo.expandToInclude(feature.getGeometry().getEnvelopeInternal()); } } //zoom to the envelope (with a factor which determines the zooming-level) context.getLayerViewPanel().getViewport().zoom(EnvelopeUtil.bufferByFraction(envToZoomTo,0.5)); for changing the fill-color you should add a temporary legend-field in the attribute-table of your layer, fill it with a special value for the features to select and set the style of the layer respectively. For working with styles look here: http://sourceforge.net/mailarchive/forum.php?thread_name=4d70f030909180629s2fa48105kb3068f87aeaf%40mail.gmail.com&forum_name=jump-pilot-devel Helmut Seidel M.A. schrieb: Hello again, thank you for your replies. Maybe I should have stated that I'm working on a plugin, not an external application. Thanks again Helmut Am 07.07.2010 08:05, schrieb Matthias Scholz: Hi Sunburned Surveyor, at the moment I use a textfile, because this was the simplest way and there are no needs to change anything in the Archikart Software. I've reused a interface to an other GIS. Matthias Matthias, I'm curious what method you are using to communicate with OpenJUMP. Can you tell me? The Sunburned Surveyor On Tue, Jul 6, 2010 at 12:04 PM, Matthias Scholz wrote: Hi Helmut, I've build a plugin for interfacing OJ with an external application called "Archikart" (www.archikart.de), for use at my employer. You can select a geometry in OJ an show the metadata in Archikart and the reverse way, show a geometry in OJ from Archikart. The plugin searches on all layers for the feature, selects the features and zoom to the selected features. At the moment we use this plugin for production, but it is not yet ready for publishing. I plan the public release for the end of the year. If you are interested, i can mail you the Netbeans project. If you work on a similar project, it would be nice if we can build one common plugin for interfacing OJ from external applications and vice versa. Matthias Hello everybody, thanks to your help I was able to start my project. So far I am able to extract some attributes from the selected elements look them up in a mysql-database and display the results in openJump. This was possible for me through the HowTo in your developers docs section. Now I need the other way round, i.e. look up some data in my mysql-database (which is the easy part), find the corosponding attributes in the displayed layer, select the feature (best by changeing the background-(fill-)color) and zoom to it. I'm not sure where to find the necessary methods in openJump - has anybody got a short example? Thanks 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 -- 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 ___
Re: [JPP-Devel] Select shape by attribute
Hello again, thank you for your replies. Maybe I should have stated that I'm working on a plugin, not an external application. Thanks again Helmut Am 07.07.2010 08:05, schrieb Matthias Scholz: > Hi Sunburned Surveyor, > > at the moment I use a textfile, because this was the simplest way and > there are no needs to change anything in the Archikart Software. I've > reused a interface to an other GIS. > > Matthias > >> Matthias, >> >> I'm curious what method you are using to communicate with OpenJUMP. >> Can you tell me? >> >> The Sunburned Surveyor >> >> On Tue, Jul 6, 2010 at 12:04 PM, Matthias Scholz wrote: >> >> >>> Hi Helmut, >>> >>> I've build a plugin for interfacing OJ with an external application >>> called "Archikart" (www.archikart.de), for use at my employer. You can >>> select a geometry in OJ an show the metadata in Archikart and the >>> reverse way, show a geometry in OJ from Archikart. The plugin searches >>> on all layers for the feature, selects the features and zoom to the >>> selected features. >>> At the moment we use this plugin for production, but it is not yet ready >>> for publishing. I plan the public release for the end of the year. If >>> you are interested, i can mail you the Netbeans project. If you work on >>> a similar project, it would be nice if we can build one common plugin >>> for interfacing OJ from external applications and vice versa. >>> >>> Matthias >>> >>> Hello everybody, thanks to your help I was able to start my project. So far I am able to extract some attributes from the selected elements look them up in a mysql-database and display the results in openJump. This was possible for me through the HowTo in your developers docs section. Now I need the other way round, i.e. look up some data in my mysql-database (which is the easy part), find the corosponding attributes in the displayed layer, select the feature (best by changeing the background-(fill-)color) and zoom to it. I'm not sure where to find the necessary methods in openJump - has anybody got a short example? Thanks 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 >>> -- >>> 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] Select shape by attribute
Hi Sunburned Surveyor, at the moment I use a textfile, because this was the simplest way and there are no needs to change anything in the Archikart Software. I've reused a interface to an other GIS. Matthias > Matthias, > > I'm curious what method you are using to communicate with OpenJUMP. > Can you tell me? > > The Sunburned Surveyor > > On Tue, Jul 6, 2010 at 12:04 PM, Matthias Scholz wrote: > >> Hi Helmut, >> >> I've build a plugin for interfacing OJ with an external application >> called "Archikart" (www.archikart.de), for use at my employer. You can >> select a geometry in OJ an show the metadata in Archikart and the >> reverse way, show a geometry in OJ from Archikart. The plugin searches >> on all layers for the feature, selects the features and zoom to the >> selected features. >> At the moment we use this plugin for production, but it is not yet ready >> for publishing. I plan the public release for the end of the year. If >> you are interested, i can mail you the Netbeans project. If you work on >> a similar project, it would be nice if we can build one common plugin >> for interfacing OJ from external applications and vice versa. >> >> Matthias >> >>> Hello everybody, >>> >>> thanks to your help I was able to start my project. So far I am able to >>> extract some attributes from the selected elements look them up in a >>> mysql-database and display the results in openJump. This was possible >>> for me through the HowTo in your developers docs section. >>> >>> Now I need the other way round, i.e. look up some data in my >>> mysql-database (which is the easy part), find the corosponding >>> attributes in the displayed layer, select the feature (best by changeing >>> the background-(fill-)color) and zoom to it. I'm not sure where to find >>> the necessary methods in openJump - has anybody got a short example? >>> >>> Thanks 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 >>> >>> >> -- >> 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] Select shape by attribute
Matthias, I'm curious what method you are using to communicate with OpenJUMP. Can you tell me? The Sunburned Surveyor On Tue, Jul 6, 2010 at 12:04 PM, Matthias Scholz wrote: > Hi Helmut, > > I've build a plugin for interfacing OJ with an external application > called "Archikart" (www.archikart.de), for use at my employer. You can > select a geometry in OJ an show the metadata in Archikart and the > reverse way, show a geometry in OJ from Archikart. The plugin searches > on all layers for the feature, selects the features and zoom to the > selected features. > At the moment we use this plugin for production, but it is not yet ready > for publishing. I plan the public release for the end of the year. If > you are interested, i can mail you the Netbeans project. If you work on > a similar project, it would be nice if we can build one common plugin > for interfacing OJ from external applications and vice versa. > > Matthias >> Hello everybody, >> >> thanks to your help I was able to start my project. So far I am able to >> extract some attributes from the selected elements look them up in a >> mysql-database and display the results in openJump. This was possible >> for me through the HowTo in your developers docs section. >> >> Now I need the other way round, i.e. look up some data in my >> mysql-database (which is the easy part), find the corosponding >> attributes in the displayed layer, select the feature (best by changeing >> the background-(fill-)color) and zoom to it. I'm not sure where to find >> the necessary methods in openJump - has anybody got a short example? >> >> Thanks 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 >> > > > -- > 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] Select shape by attribute
Hi Helmut, I've build a plugin for interfacing OJ with an external application called "Archikart" (www.archikart.de), for use at my employer. You can select a geometry in OJ an show the metadata in Archikart and the reverse way, show a geometry in OJ from Archikart. The plugin searches on all layers for the feature, selects the features and zoom to the selected features. At the moment we use this plugin for production, but it is not yet ready for publishing. I plan the public release for the end of the year. If you are interested, i can mail you the Netbeans project. If you work on a similar project, it would be nice if we can build one common plugin for interfacing OJ from external applications and vice versa. Matthias > Hello everybody, > > thanks to your help I was able to start my project. So far I am able to > extract some attributes from the selected elements look them up in a > mysql-database and display the results in openJump. This was possible > for me through the HowTo in your developers docs section. > > Now I need the other way round, i.e. look up some data in my > mysql-database (which is the easy part), find the corosponding > attributes in the displayed layer, select the feature (best by changeing > the background-(fill-)color) and zoom to it. I'm not sure where to find > the necessary methods in openJump - has anybody got a short example? > > Thanks 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 > -- 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
[JPP-Devel] Select shape by attribute
Hello everybody, thanks to your help I was able to start my project. So far I am able to extract some attributes from the selected elements look them up in a mysql-database and display the results in openJump. This was possible for me through the HowTo in your developers docs section. Now I need the other way round, i.e. look up some data in my mysql-database (which is the easy part), find the corosponding attributes in the displayed layer, select the feature (best by changeing the background-(fill-)color) and zoom to it. I'm not sure where to find the necessary methods in openJump - has anybody got a short example? Thanks 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