Re: [Geotools-gt2-users] new blog post - fun with graticules

2015-06-22 Thread Michael Bedward
Cool ! Nice work Ian. Michael On 23 June 2015 at 00:47, Ian Turton ijtur...@gmail.com wrote: I've been playing with creating labeled graticules in GeoTools, see http://blog.ianturton.com/geotools/mapping/cartography/2015/06/17/fun-with-graticules.html for examples. If people agree that

Re: [Geotools-gt2-users] Possible to deploy GeoTools to maven central repositories?

2014-09-04 Thread Michael Bedward
On 5 September 2014 09:52, Jody Garnett jody.garn...@gmail.com wrote: So GeoTools for example would not be able to deploy until JTS deploys :) Since we have a lot of dependencies this does not seem likely. Not quite - JTS is already at maven central.

Re: [Geotools-gt2-users] No Repaint of MapPane on manipulating the layer

2014-04-03 Thread Michael Bedward
Hello Florian, There did used to be such a chain of events which JMapPane took advantage of, but it was unfortunately dropped some time ago when the feature collection classes were reworked. The following thread may be helpful:

Re: [Geotools-gt2-users] Geotools JavaFX Netbeans 7.4

2013-12-01 Thread Michael Bedward
this helps someone Frank On Fri, Nov 29, 2013 at 10:06 PM, Michael Bedward michael.bedw...@gmail.com wrote: Does this help at all ? http://www.adam-bien.com/roller/abien/entry/how_to_compile_java_fx Michael On 29 November 2013 08:50, Frank van der Hulst drifter.fr...@gmail.com wrote: Hi

Re: [Geotools-gt2-users] Geotools JavaFX Netbeans 7.4

2013-11-29 Thread Michael Bedward
as a dependency in the POM file, I think I'd be just about there. Frank On Thu, Nov 28, 2013 at 5:13 PM, Michael Bedward michael.bedw...@gmail.com wrote: Hi Frank, Well I did say it was a stab in the dark :) As an experiment, I just tried taking the includes section out of the pom.xml in the gist

Re: [Geotools-gt2-users] Geotools JavaFX Netbeans 7.4

2013-11-27 Thread Michael Bedward
.FXMLController.handleButtonAction(FXMLController.java:27) Frank On Wed, Nov 27, 2013 at 2:40 PM, Michael Bedward michael.bedw...@gmail.com wrote: Hi Frank, Your last reply fell off the list... Here's an example pom.xml to create a GeoTools uber jar using the shade plugin... https://gist.github.com/mbedward

Re: [Geotools-gt2-users] Geotools JavaFX Netbeans 7.4

2013-11-26 Thread Michael Bedward
directory of the Maven/POM Project. That produces a geotools.jar :) But it is a MANIFEST-only jar, which suggests that it hasn't done what I want :( Can someone point me at how to build gt-uber? Frank On Tue, Nov 26, 2013 at 1:22 PM, Michael Bedward michael.bedw...@gmail.com wrote: Hi

Re: [Geotools-gt2-users] Geotools JavaFX Netbeans 7.4

2013-11-25 Thread Michael Bedward
Hi Frank, This is just a stab in the dark... Are you using this plugin: http://zenjava.com/javafx/maven/ ? And if so are you also using it to build an executable jar ? The error dump looks like it might be an SPI problem which can happen with GeoTools when module jars are combined into a

Re: [Geotools-gt2-users] Geotools JavaFX Netbeans 7.4

2013-11-25 Thread Michael Bedward
/plugin Frank On Tue, Nov 26, 2013 at 11:50 AM, Michael Bedward michael.bedw...@gmail.com wrote: Hi Frank, This is just a stab in the dark... Are you using this plugin: http://zenjava.com/javafx/maven/ ? And if so are you also using it to build an executable jar ? The error dump looks

Re: [Geotools-gt2-users] How to write shapefile of type 'Polygon' no 'Polygon ZM' in GT 10.2?

2013-11-25 Thread Michael Bedward
Just in case, does it make any difference if you call the polygon attribute the_geom rather than Extent ? I've been creating shapefiles with Polygon geometry using GT 10.2 and when the geometry attribute was called something other than the_geom it appeared empty when displayed. Michael On 26

Re: [Geotools-gt2-users] null pointer expection inShapefileFeatureSource

2013-09-19 Thread Michael Bedward
On 20 September 2013 07:58, Andrea Aime andrea.a...@geo-solutions.it wrote: On Thu, Sep 19, 2013 at 10:51 PM, Duane Zamrok zam...@cubrc.org wrote: I’m not sure if Hal was working on the SelectionLab of the Style tutorial (http://docs.geotools.org/latest/userguide/tutorial/map/style.html) or

Re: [Geotools-gt2-users] Deprecated Methods/Objects?

2013-09-09 Thread Michael Bedward
Hi Philipp, Especially the ‘SelectionLab.java’, which contains two lines using ‘MapContext’ objects, is basically unusable. It sounds like you are looking at an old version of the SelectionLab tutorial code. The current one definitely uses MapContent rather than MapContext:

Re: [Geotools-gt2-users] raster image not aligned to shapefile

2013-09-06 Thread Michael Bedward
Hello Hal, I have several shapefiles and a raster (a Hillshade created in ArcMap from elevation data) that align perfectly when I view them in ArcMap (10.0). I then export the hillshade to a tiff file using the extent and CRS of the ArcMap data frame. When I load them into my geotools

Re: [Geotools-gt2-users] Loading EPSG:4326 CRS

2013-09-05 Thread Michael Bedward
On 6 September 2013 08:42, Spencer Bliven sbli...@ucsd.edu wrote: [SOLVED] Thanks for the help, Michael! I think you did all the work Spencer :) Michael -- Learn the latest--Visual Studio 2012, SharePoint 2013, SQL

Re: [Geotools-gt2-users] Selecting features on a Raster Map

2013-09-04 Thread Michael Bedward
On 5 September 2013 07:10, David Purdy david.pu...@jjmtechcorp.com wrote: May I ask how you go about implementing the click and drag to establish a rectangle? I have a feature that creates a polygon but requires several clicks, not the click and drag. I'm not looking for the code, just the

Re: [Geotools-gt2-users] Loading EPSG:4326 CRS

2013-08-28 Thread Michael Bedward
Hi Spencer, Use the maven shade plugin instead of the assembly plugin: http://docs.geotools.org/latest/userguide/build/faq.html#how-do-i-create-an-executable-jar-for-my-geotools-app Michael On 29 August 2013 11:39, Spencer Bliven sbli...@ucsd.edu wrote: Hello, I've run into a problem with

Re: [Geotools-gt2-users] Geotools 8.0 to 9.4 difference with SimpleFeatureCollection and Map refresh

2013-08-22 Thread Michael Bedward
On 23 August 2013 01:03, Andrea Aime andrea.a...@geo-solutions.it wrote: I believe that functionality was based on the feature collection events, which were dropped because only in memory collections actually implemented them (after several years they were introduced). Yep - that's right. It's

Re: [Geotools-gt2-users] EPSG error

2013-08-08 Thread Michael Bedward
Yes, that's the best way to do it. There is a GeoTools FAQ about this too: http://docs.geotools.org/latest/userguide/faq.html#how-do-i-create-an-executable-jar-for-my-geotools-app Michael On 9 August 2013 07:26, Barret Burke barret.bu...@gmail.com wrote: Regarding Andrea Aime last response:

Re: [Geotools-gt2-users] Feature geometry modify and viewer in execution time

2013-08-02 Thread Michael Bedward
Hi Jairo, Can you describe the output that you would like to get in more detail please ? Michael On 2 August 2013 05:15, Jairo de Almeida jairodealme...@gmail.com wrote: Hello, Guys I have implemented a algorithm to union about polygons with restriction. And have some problems to implement

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-29 Thread Michael Bedward
Could you update the axis order page Ben, for the benefit of future generations (esp. simple folk like me) ? After reading your replies I saw the note about the ogc urn thing, but it is at the very bottom of the page. It should also probably get a mention in the referencing FAQ. cheers Michael

Re: [Geotools-gt2-users] Need help reprojecting ReferencedEnvelope

2013-07-28 Thread Michael Bedward
Does this help Gaby ? http://docs.geotools.org/latest/userguide/library/referencing/order.html Michael On 29 July 2013 13:06, gaby g.tu...@niwa.co.nz wrote: I would like to reproject a ReferencedEnvelope from NZMG to NZTM. My code is a follows: ReferencedEnvelope envelope = new

Re: [Geotools-gt2-users] Re-centering map on a Coordinate/Point

2013-07-22 Thread Michael Bedward
Hi David, The centering is done by the onMouseClicked method of the zoom in and out tools. It's a pretty simple calculation. Have a look at the source below and you should be able to adapt it to your needs...

Re: [Geotools-gt2-users] Re-centering map on a Coordinate/Point

2013-07-22 Thread Michael Bedward
. Thanks so much!! ** ** David ** ** *From:* Michael Bedward [mailto:michael.bedw...@gmail.com] *Sent:* Monday, July 22, 2013 10:06 PM *To:* David Purdy *Cc:* geotools users *Subject:* Re: [Geotools-gt2-users] Re-centering map on a Coordinate/Point ** ** Hi David

Re: [Geotools-gt2-users] JMapPane not repainting properly some times

2013-07-16 Thread Michael Bedward
Mmm... while it's ok to call the layerChanged method manually, it should not be unnecessary. That method gets called behind the scenes as part of the event chain when the layer is removed from the MapContent. In your gist, you should really put the code that sets up and displays the JMapFrame

Re: [Geotools-gt2-users] JMapPane not repainting properly some times

2013-07-16 Thread Michael Bedward
On 17 July 2013 10:55, Michael Bedward michael.bedw...@gmail.com wrote: should not be unnecessary. Oops, I meant should not be necessary. Michael -- See everything from the browser to the database with AppDynamics Get

Re: [Geotools-gt2-users] Label of removed layer getting painted in JMapPane

2013-07-15 Thread Michael Bedward
Hi Sunish, It's well hidden but you can do this... StreamingRenderer renderer = mapPane.getRenderer(); MapObject, Object hints = renderer.getRendererHints(); LabelCache cache = (LabelCache) hints.get(StreamingRenderer.LABEL_CACHE_KEY); cache.clear(); You could also sub-class JMapPane and access

Re: [Geotools-gt2-users] Get coordinates of square grid

2013-07-12 Thread Michael Bedward
Hello, The answer is it depends :) Each square in the grid is represented by a SimpleFeature having, as its geometry attribute, a JTS Polygon. You can retrieve the vertex coordinates of the polygon using the Polygon.getCoordinates() method...

Re: [Geotools-gt2-users] Drawing points, lines and polygons on a map

2013-04-08 Thread Michael Bedward
Hi Farrukh, My Bad. I just attached the patch file. I assumed that since one has to click on a feature to get its information, it would be desirable to get all information about the feature (kind of like a Show Details action). If feature info was being dumped for all features then I could

Re: [Geotools-gt2-users] Drawing points, lines and polygons on a map

2013-04-07 Thread Michael Bedward
Hi Farrukh, Thanks for those kind words about the swing module. It's good to hear that you were able to extend it for your application relatively easily. I just had a quick look at your feature request but don't see your patch. However, my first thought is that the WKT for geometries other than

Re: [Geotools-gt2-users] GridCoverage2D MultiplyConst HowTo set parameters

2013-02-07 Thread Michael Bedward
Hi Pablo, Unless you really need to work with the low-level coverage operations and parameters classes I'd avoid them. It is much easier, and better for your sanity, to use the Operations helper class instead. Example... GridCoverage2D cov = ... double[] factor = new double { 42 }; // one

Re: [Geotools-gt2-users] GridCoverage2D MultiplyConst HowTo set parameters

2013-02-07 Thread Michael Bedward
Sorry, minor code mistake. Should have been: double[] factor = new double[] { 42 }; On 8 February 2013 13:31, Michael Bedward michael.bedw...@gmail.com wrote: Hi Pablo, Unless you really need to work with the low-level coverage operations and parameters classes I'd avoid them. It is much

Re: [Geotools-gt2-users] 'Point with direction' symbolization

2013-01-30 Thread Michael Bedward
Hi Sergey, Haven't tested this, but it can perhaps be done with the combination of an external graphic for the point symbol with a rotation element in the SLD file linking the angle to your feature attribute: Rotation ogc:PropertyNamedirAttributeName/ogc:PropertyName /Rotation

Re: [Geotools-gt2-users] Problem in Running the file

2013-01-28 Thread Michael Bedward
Please have a look at the more recent GeoTools Quickstart tutorial. It shows how to load and display a shapefile in a simple manner: http://docs.geotools.org/stable/userguide/tutorial/quickstart/ Michael On 28 January 2013 18:31, PARDHU D dpardhu...@yahoo.in wrote: Hi to all, I have

Re: [Geotools-gt2-users] Problem in Running the file

2013-01-28 Thread Michael Bedward
Hello, Please send your questions to the list rather than to me personally. Thanks for your reply. I already use this link and successfully called shape file into program. I am using NetBeans IDE 7.2.1 now I want to call a shape with out JMapFrmae into my program can it is possible? I

Re: [Geotools-gt2-users] Problem in showing Layer on JmapPane

2013-01-23 Thread Michael Bedward
Hello Kapil, Your code is much more complicated that it needs to be and is also using very low-level classes / methods instead of higher-level user-friendly classes. Please study the GeoTools feature tutorial: http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html There you

Re: [Geotools-gt2-users] AutoCommit does not support the getState opperations Error

2013-01-23 Thread Michael Bedward
Sorry - I've never used OMS and only have a dim idea of how it works. I'm copying this reply to someone who has worked with OMS and GeoTools a lot in case he can help. Other than that I guess you have to try the OMS folk at JavaForge (although their discussion forum looks to be ignored).

Re: [Geotools-gt2-users] Problem in showing Layer on JmapPane

2013-01-22 Thread Michael Bedward
Hello Kapil, Looking at the error trace, the problem is with your feature data (java.lang.String cannot be cast to com.vividsolutions.jts.geom.Geometry). Your FeatureHelper class must need a little help :) Michael On 22 January 2013 20:28, kapil kapilsharma...@gmail.com wrote: Hi List, I

Re: [Geotools-gt2-users] [Geotools-devel] GeoServer + PostGIS + Raster...

2013-01-21 Thread Michael Bedward
Hi Brett, Mikel, Could other devs please look at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.decimationOnReadingControl and confirm or deny that there is no possibility of a rounding error, underflow or double to int conversion that results in a negative number! Mikel, it

Re: [Geotools-gt2-users] generating large map bitmaps?

2013-01-20 Thread Michael Bedward
On 20 January 2013 21:09, Andrea Aime andrea.a...@geo-solutions.it wrote: Hmm... labels are always drawn last, wondering if with bigger images the tiles are getting swapped to disk, and when they are retrieved back to draw the labels for some reason they are not writable anymore. Just a

Re: [Geotools-gt2-users] generating large map bitmaps?

2013-01-20 Thread Michael Bedward
transformations ? is this something else we can add a test for ? Michael On 20 January 2013 21:24, Ákos Maróy a...@maroy.hu wrote: On 20/01/13 11:14, Michael Bedward wrote: On 20 January 2013 21:09, Andrea Aime andrea.a...@geo-solutions.it wrote: Hmm... labels are always drawn last, wondering

Re: [Geotools-gt2-users] generating large map bitmaps?

2013-01-20 Thread Michael Bedward
I love it when bugs get fixed while I'm sleeping peacefully :) Thanks for your great detective work Akos - very much appreciated. The patch looks good. The jaitools sources and issues were moved to GitHub last week so I've copied your Google Code issue there:

Re: [Geotools-gt2-users] generating large map bitmaps?

2013-01-20 Thread Michael Bedward
On 21 January 2013 18:28, Ákos Maróy a...@maroy.hu wrote: and committed your fix: https://github.com/mbedward/jaitools/commit/master excellent. would this mean that this would appear in the -SNAPSHOT version of jaitools soon, through maven repositories? Hi Ákos, Yep - the 1.3 snapshot jars

Re: [Geotools-gt2-users] generating large map bitmaps?

2013-01-19 Thread Michael Bedward
On 20 January 2013 04:27, Ákos Maróy a...@maroy.hu wrote: On 19/01/13 18:19, Andrea Aime wrote: Interesting. Anyways, if memory serves me right, TiledImage is tiled, but still fully allocated in memory: if I'm right and you're trying to render something that won't fit in memory you're out of

Re: [Geotools-gt2-users] Create memory layer without datasource

2013-01-17 Thread Michael Bedward
Hello Jairo, You have your SimpleFeatureTypeBuilder inside the loop that is creating features. So you are building a new, identical type for each separate feature and ending up with a very confused feature collection. Michael On 18 January 2013 03:02, Jairo de Almeida jairodealme...@gmail.com

Re: [Geotools-gt2-users] Create memory layer without datasource

2013-01-17 Thread Michael Bedward
a MapContent instance by default - although I guess it would be easy to add that behaviour without affecting any existing client code. I don't remember anyone asking for it though... Michael On 18 January 2013 11:03, Michael Bedward michael.bedw...@gmail.com wrote: Hello Jairo, You have your

Re: [Geotools-gt2-users] How to add polygons on existing map?

2013-01-16 Thread Michael Bedward
Hello, Thanks for sending the code... i am pasting here the complete code .. In this file i m trying to add a point layer on click of the Viewdata button.. but the point is not added on button click.. instead it gets added on clicking reset button..i hope you can see the problem.. I

Re: [Geotools-gt2-users] How to add polygons on existing map?

2013-01-16 Thread Michael Bedward
On 17 January 2013 04:31, starscream niko...@hotmail.it wrote: I found another example on web: What I wish http://kyle-in-jp.blogspot.it/2012/01/geotools_25.html I'm afraid that is not a good example of how to draw a single graphic element on a map. It would be much easier to use a

Re: [Geotools-gt2-users] AutoCommit does not support the getState opperations Error

2013-01-16 Thread Michael Bedward
Hello, If you connect to the shapefile like this... FileDataStore store = FileDataStoreFinder.getDataStore(file); SimpleFeatureSource source = store.getFeatureSource(); ...do you still get the error ? Michael On 17 January 2013 13:23, Alireza Shamakhy alireza.shama...@gmail.com wrote: Hi,

Re: [Geotools-gt2-users] AutoCommit does not support the getState opperations Error

2013-01-16 Thread Michael Bedward
What version of GeoTools are you using ? On 17 January 2013 14:45, Alireza Shamakhy alireza.shama...@gmail.com wrote: Hi Michael, Thanks for your reply. Yes if I use FileDataStore still I get the error. I think the problem occurs when I copy value of SimpleFeatureSource from one class to

Re: [Geotools-gt2-users] How to add polygons on existing map?

2013-01-16 Thread Michael Bedward
No worries - thanks for letting us know. Michael On 17 January 2013 17:01, Boided richa...@gmail.com wrote: Hi Michael , I tried my code with (countries.shp) as you did and it worked fine. and then i realised my mistake. i was passing the wrong values to the coordinates. i

Re: [Geotools-gt2-users] AutoCommit does not support the getState opperations Error

2013-01-16 Thread Michael Bedward
Mmm... I just read your message again... I think the problem occurs when I copy value of SimpleFeatureSource from one class to another class. It is weird since the class type of the variable that holds SimpleFeatureSource in both classes are same, but the hashcode are not same. Is the

Re: [Geotools-gt2-users] How to add polygons on existing map?

2013-01-15 Thread Michael Bedward
Hello, Sorry, but it's hard to answer your question because you don't describe or show how you are using the Layer that your method creates, or describe the other layers and viewport settings associated with your MapContent. I can't see anything obviously wrong with your method, although I

Re: [Geotools-gt2-users] generating large map bitmaps?

2013-01-15 Thread Michael Bedward
Hi Akos, Andrea, Jody and others here are rendering gurus and I hope they will follow with more expert advice, but I'll get the ball rolling... If the destination image fits into available memory then yes, simply create a Graphics2D instance from the image and pass that to the renderer. If the

Re: [Geotools-gt2-users] How to add polygons on existing map?

2013-01-15 Thread Michael Bedward
Hello, Again, it's hard to know without knowing more about the other parts of your code and your data. If you can send me a *small* example app (off-list or via a paste site) which displays the problem I'll have a look at it and see if it's a gt-swing problem. Michael On 16 January 2013 16:12,

Re: [Geotools-gt2-users] How to add polygons on existing map?

2013-01-14 Thread Michael Bedward
Hello, Firstly, please try to be more specific with your questions: for example, I want to do X but when I run my app it does Y, or my code fails to compile with the following error trace... etc. People here want to help you, but if you just post code with a general please help message you are

Re: [Geotools-gt2-users] How to add polygons on existing map?

2013-01-14 Thread Michael Bedward
Ah, but you're doing the same thing again :) Before you had a feature type with one attribute but tried to create a feature with two. Now you have a type with two attributes... // add attributes in order builder.add(Location, Point.class); builder.length(15).add(Name,

Re: [Geotools-gt2-users] Map flickers on panning

2012-12-23 Thread Michael Bedward
Hello, Instead of MapContext / DefaultMapContext, which is deprecated in GeoTools versions 8.x, please try using the newer MapContent class and see if that fixes the problem: http://docs.geotools.org/stable/javadocs/org/geotools/map/MapContent.html Michael On 24 December 2012 16:33, Boided

Re: [Geotools-gt2-users] Adding a point on selected lat/lon position

2012-12-23 Thread Michael Bedward
On 24 December 2012 15:59, Boided richa...@gmail.com wrote: Thanks again Michael . It Worked. :) Good to hear - thanks for letting us know. Michael -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free

Re: [Geotools-gt2-users] Adding a point on selected lat/lon position

2012-12-22 Thread Michael Bedward
On 21 December 2012 21:15, Boided richa...@gmail.com wrote: Can anyone please suggest about how to add a point on the map on a location One question mark is usually enough. More doesn't get you better answers :) You could use a DirectLayer to display your point:

Re: [Geotools-gt2-users] Add just some geometries like a layer from a shapefile

2012-12-12 Thread Michael Bedward
Hello Jose, Have a look at the docs for filter which explain how to select subsets features: http://docs.geotools.org/latest/userguide/library/main/filter.html Michael On 12 December 2012 21:23, Jose Angel Jimenez Perez joseangel...@gmail.com wrote: Hello at all, I have a shapefile with

Re: [Geotools-gt2-users] [Help!] Newbie in GeoTools

2012-12-10 Thread Michael Bedward
Hello, It sounds like you are asking about displaying multiple layers and applying map styles (e.g. point symbols) - is that right ? You have already created a FeatureLayer to display your base shapefile. In the same way you can add further layers to your map (e.g. points of interest) by

Re: [Geotools-gt2-users] gvSIG CE codesprint: geotools integration

2012-12-06 Thread Michael Bedward
Many thanks for the update Fernando. The development path that you describe sounds like a good choice. I'll be following your progress with interest. Michael On 6 December 2012 19:41, Fernando González fergo...@gmail.com wrote: Hi, after some work on this line we are able to share some results.

Re: [Geotools-gt2-users] Problems to rendering the map using JMapPane

2012-12-05 Thread Michael Bedward
PS. forgot to mention that another, simpler option for doing grid / feature layer creation on a separate thread is to use the Java SwingWorker class On 6 December 2012 16:00, Michael Bedward michael.bedw...@gmail.com wrote: Hi Jairo, I've had a quick look at your program. I don't have time

Re: [Geotools-gt2-users] Problems to rendering the map using JMapPane

2012-12-04 Thread Michael Bedward
Hi Jairo, You are calling repaint() from within the paintComponent method of your sub-class - I think that could result in an infinite loop in the event dispatch thread and might be the cause of the incomplete renderings. Michael On 4 December 2012 22:22, Jairo de Almeida

Re: [Geotools-gt2-users] Problems to rendering the map using JMapPane

2012-12-04 Thread Michael Bedward
Hi Jairo, Please reply to the list, not to me directly You're right, don't is correct repaint panel in paintComponent method, But is this was a crazy tentative to solve this problem The rendering problem persist http://s10.postimage.org/ghj8au16x/geotools_image2.png I don't have any idea to

Re: [Geotools-gt2-users] ShapeFileDataStoreFactory uses createIndex variable to control whether index is used in shapefiles [SEC=UNCLASSIFIED]

2012-12-02 Thread Michael Bedward
Thanks Geoff - I saw your previous message to Andrea too. Looks like things are underway. Always happy to help the met bureau :) Michael On 3 December 2012 17:16, Geoff Williams g.willia...@bom.gov.au wrote: Hi Michael, Thanks for the feedback, I've updated Jira with an updated patch

Re: [Geotools-gt2-users] ShapeFileDataStoreFactory uses createIndex variable to control whether index is used in shapefiles [SEC=UNCLASSIFIED]

2012-11-30 Thread Michael Bedward
Hi Geoff, Thanks for the bug report and the patch. I've created a Jira issue with your patch attached: https://jira.codehaus.org/browse/GEOT-4336 I'm afraid it's hard to say when this will be looked at. Andrea, who maintains the shapefile module, is one of the most over-worked developers on

Re: [Geotools-gt2-users] GeoTiffReader: check if point is in coverage

2012-11-23 Thread Michael Bedward
Hi Jan, The reader.getOriginalEnvelope method returns a GeneralEnvelope, which provides a contains method with an edgesInclusive arg: http://docs.geotools.org/latest/javadocs/org/geotools/geometry/GeneralEnvelope.html#contains(org.opengis.geometry.Envelope,%20boolean) See if that helps.

Re: [Geotools-gt2-users] Gdal error while running ImageLab example

2012-11-22 Thread Michael Bedward
You're not having much luck are you :) I just tried the ImageLab app from within NetBeans using GeoTools version 8.0 and there were no errors either building or running it. Below is the pom.xml that I used. Please try another NetBeans / Maven build using this pom in place of your existing pom.

Re: [Geotools-gt2-users] Gdal error while running ImageLab example

2012-11-22 Thread Michael Bedward
No worries - glad to hear it's working for you. Michael On 22 November 2012 20:46, Boided richa...@gmail.com wrote: Thanks for the reply.. I shifted from geotools 8.0 to 8.3 and now it is working. Finally :) it is working fine withou Maven also. Thanks a lot for your suggestions.

Re: [Geotools-gt2-users] Gdal error while running ImageLab example

2012-11-21 Thread Michael Bedward
Hello, I am not using Maven. i am running the project on Netbeans without Maven.. i tried running ImageLab example and included all the dependencies required. Gdal is also installed. I am using a Geotiff image file and a shape file.The CRS for the image file is WGS-84.. please check

Re: [Geotools-gt2-users] How to add to the jMapanel new geometries?

2012-11-20 Thread Michael Bedward
Please have a look at our tutorials, many of which use the gt-swing classes including JMapFrame / JMapPane, and then return to the list if you have more questions: http://docs.geotools.org/latest/userguide/tutorial/ Also, please see our posting guide:

Re: [Geotools-gt2-users] Reduce 4D geometry to 2D geometry

2012-11-20 Thread Michael Bedward
Hi Peter, It probably depends on what class(es) you are presently using to represent the geometries (something other than JTS I assume). If you could provide more info about that, someone here might be able to help. Michael On 21 November 2012 03:09, Peter Hopfgartner

Re: [Geotools-gt2-users] i want to show in the map is a litle star png

2012-11-20 Thread Michael Bedward
Hello, If you are defining your map style via a SLD file, you can use the ExternalGraphic element to point to your png file. There is an example of this here: http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/points.html#point-as-graphic If instead you want to do this

Re: [Geotools-gt2-users] Gdal error while running ImageLab example

2012-11-20 Thread Michael Bedward
Hello, Not sure what's going on, but ignoring the Kakadu message (which as Simone says is just a warning) it looks like the error is related to decoding the coordinate reference system (CRS) of your image. Firstly, are you building and running the example with Maven ? I ask because this type of

Re: [Geotools-gt2-users] Cut some polygon with a polygon

2012-11-19 Thread Michael Bedward
Hello, Not sure what you mean by cut the list. If the result should be a list containing those portions of the input polygons that overlap the target polygon, you could call Geometry.intersection on each input polygon in turn:

Re: [Geotools-gt2-users] Create a polygon many with points

2012-11-16 Thread Michael Bedward
Hello Augusto, That looks like a Voronoi diagram. Have a look at the VoronoiDiagramBuilder class from the JTS library: http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/triangulate/VoronoiDiagramBuilder.html Initially you could clip the diagram to the bounding envelope of your input

Re: [Geotools-gt2-users] Remove the geometry Column from filter

2012-11-16 Thread Michael Bedward
Hello, The table display in the tutorial uses org.geotools.swing.FeatureCollectionTableModel class (gt-swing module) which creates a column for each attribute in the feature type, plus one for feature id. It doesn't provide a mechanism to choose which columns to display - it was really only

Re: [Geotools-gt2-users] Finding the id field for a FeatureType

2012-11-15 Thread Michael Bedward
Hi David, Given a FeatureType instance, is it possible to find out programmatically which field is used for FeatureIds in that FeatureType? After looking on the FeatureType interface itself I'm not sure where I should look. There is no link between FeatureType and FeatureId. Rather,

Re: [Geotools-gt2-users] Render a GridCoverage2D to a heat map

2012-11-14 Thread Michael Bedward
Hello, The code to retrieve the Style from the SLD file should look more like this... /** * Create a Style object from a definition in a SLD document */ private Style createFromSLD(File sld) { try { SLDParser stylereader = new SLDParser(styleFactory,

Re: [Geotools-gt2-users] SimpleLine contains some points

2012-11-14 Thread Michael Bedward
Hello Steve, If you can define a tolerance within which geometries should be treated as coincident you could use Geometry.buffer and then test for intersection etc. Michael On 15 November 2012 03:07, Steve Mitchell stevecmitch...@gmail.com wrote: Trying to find the right way to test line

Re: [Geotools-gt2-users] SimpleLine contains some points

2012-11-14 Thread Michael Bedward
Hi Steve, Is the tolerance that you speak of referring only to Geometry.buffer()? I've tried setting Geometry.buffer but it had no effect on my line string comparison. Calling geomA.buffer(dist) does not modify geomA, it returns a new buffered geometry... double dist = ... Geometry geomB =

Re: [Geotools-gt2-users] How to export a executable jar using geotools

2012-11-09 Thread Michael Bedward
On 9 November 2012 19:23, Andrea Aime andrea.a...@geo-solutions.it wrote: Never use the Maven eclipse integration, it's way too slow to handle the 150+ projects one gets by loading all geotools and geoserver in a single IDE instance. Command line for the win! Ah - the IDEs are for wimps

Re: [Geotools-gt2-users] Render a GridCoverage2D to a heat map

2012-11-09 Thread Michael Bedward
Hello, When you say heat map fashion do you mean how to define a colour gradient for display ? If so, these examples of raster styling (from the GeoServer SLD cookbook) show how to define gradients with a SLD file: http://docs.geoserver.org/latest/en/user/styling/sld-cookbook/rasters.html You

[Geotools-gt2-users] GeoTools webstart app [WAS: How to export a executable jar using geotools]

2012-11-09 Thread Michael Bedward
Hello Jairo, Please keep your replies directed to the list - that way you will get the benefit of the collective wisdom there rather than just my feeble brain... I'm not generate a fat jar, now im working with webstart. and set the dependences in jnlp http://pastebin.com/X5y3KTLQ But now i

Re: [Geotools-gt2-users] Advanced linestyles with graphic

2012-11-08 Thread Michael Bedward
The cool cats would probably use a rendering transformation, but a simple cat like me would cheat and create a second layer for the mid-point graphics, e.g could be a DirectLayer which holds a reference to the line FeatureLayer. Or are you looking for a SLD-only solution ? Michael On 9 November

Re: [Geotools-gt2-users] How to export a executable jar using geotools

2012-11-08 Thread Michael Bedward
Hi Jairo, Please direct replies to the list rather than to me personally. What happens if you do mvn clean install from the command line ? Nothing, because i don't have mvn mapped in windows system variables, im using maven from m2eclipse eclipse plugin. Would I have to set the environment

Re: [Geotools-gt2-users] How to export a executable jar using geotools

2012-11-08 Thread Michael Bedward
Hi Jody, Yep, Jairo has included the shade plugin in his project pom and it looks to be set up properly. He's just having problems getting it to work from within Eclipse. Have you any experience with that ? (NetBeans is so much easier :) Michael On 9 November 2012 18:44, Jody Garnett

Re: [Geotools-gt2-users] How to export a executable jar using geotools

2012-11-07 Thread Michael Bedward
Hello Jairo, Using the maven shade plugin, as detailed in the build FAQ page that you cited, is still the recommended way to produce an executable jar. The shade plugin should indeed merge the individual GeoTools META-INF/services folders properly - at least it has for me many times. The first

Re: [Geotools-gt2-users] Error with WKTParser

2012-11-07 Thread Michael Bedward
Hi Alessandro, The short answer is that you should stick to JTS geometries. As far as I understand it the ISO 19107 geometry implementation in GeoTools is experimental and incomplete (others can correct me if that's not the case). The corresponding code would be something like: String wkt =

Re: [Geotools-gt2-users] Error with WKTParser

2012-11-07 Thread Michael Bedward
Hello again Alessandro, Sorry - I didn't notice your second post when replying... but once again, unless you need features beyond those that JTS offers, using JTS directly will probably be easier and safer. Michael On 8 November 2012 14:00, Alessandro Ferrucci alessandroferru...@gmail.com

Re: [Geotools-gt2-users] How to export a executable jar using geotools

2012-11-07 Thread Michael Bedward
with : ExportRunnable jar file copy required libraries into a subfolder nex to the generated jar But export fat jar isn't works with : ExportRunnable jar file Extract required libraries into generated jar Thanks to help me 2012/11/7 Michael Bedward michael.bedw...@gmail.com Hello Jairo

Re: [Geotools-gt2-users] (no subject)

2012-11-05 Thread Michael Bedward
Hi Ratnadeep, The format for world files is detailed here: http://docs.geotools.org/latest/userguide/library/coverage/image.html#world-file Michael On 5 November 2012 01:48, Ratnadeep Raxsith qed...@gmail.com wrote: OK. Now after much banging the head on the wall, I came to realize that my

[Geotools-gt2-users] misleading code in Query tutorial (WAS: SQL 2008R2 readers/iterators being left open)

2012-11-05 Thread Michael Bedward
Hi Andrea, Just following up on this comment... On 6 November 2012 02:11, astewart stew...@navcanada.ca wrote: However, I did track down the 'offending' documentation that should be revised to reflect the use of the setQuery() method. The 'Things to Try' section of the Query tutorial

Re: [Geotools-gt2-users] misleading code in Query tutorial (WAS: SQL 2008R2 readers/iterators being left open)

2012-11-05 Thread Michael Bedward
Cool - thanks Andrea. Michael On 6 November 2012 18:21, Andrea Aime andrea.a...@geo-solutions.it wrote: I don't see anything wrong in the tutorial, nor any suggestion that collections should be fed into a layer, I guess that was just the extrapolation of the user. If anything, if there is

Re: [Geotools-gt2-users] Simple intersection

2012-11-02 Thread Michael Bedward
Hello Andre, The answer depends somewhat on how big the polygons are, the details with which they are represented (density of vertices) and what part of the globe you are working in. GeoTools uses the JTS library for geometry operations. JTS itself has no notion of projections, it simply treats

Re: [Geotools-gt2-users] A patch to fix the missing CRS info on the parsed GML2 document

2012-10-31 Thread Michael Bedward
Hi Gerson, Thanks very much for this. Bug fixes and improvements are always welcome ! Given the big workload of the core developers and inevitable delays this leads to in reviewing patches, the best things is for you to go ahead and create an issue in Jira plus an associated pull request citing

Re: [Geotools-gt2-users] Migration of project to geotools 2.2 from geotools 8.2

2012-10-30 Thread Michael Bedward
I think the best place to start is by having a look at a couple of the tutorial applications: http://docs.geotools.org/latest/userguide/tutorial/ Many of them, including the Quickstart app, use the current gt-swing classes for display. They will also give you a gentle introduction to many of the

Re: [Geotools-gt2-users] Building a GIS Project!

2012-10-28 Thread Michael Bedward
The xml code at the bottom of this message is what your pom should look like. Try putting that code into your pom (replacing the existing contents). Also, the quickstart page suggests running the Update all maven dependcies item from the Project menu in Eclipse. Please try that if you haven't

Re: [Geotools-gt2-users] ogc:Div using non-integer literals?

2012-10-28 Thread Michael Bedward
Hello Akos, Mmm... not sure what the problem is there. I just tested the Divide expression (which is confusingly not a filter function) programmatically with double-valued literals and it worked as expected (see test below). Next I tried it from a SLD file (also below) and got points labelled

  1   2   3   4   5   6   7   8   9   10   >