Hi Carlos,

The GeoTools library tends to be a bit more focused on the science side 
of things, so the StyledMapPane fell by the wayside. JMapPane is mostly 
intended for demos and to show you how to start making your client 
application.

When you add your shapefile you can provide a CoordinateReferneceSystem 
object if one was not already available using this method:
- 
http://javadoc.geotools.fr/2.3/org/geotools/data/shapefile/ShapefileDataStore.html#forceSchemaCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)

Cheers,
Jody
>
> Hello, My name is Carlos Ruiz, I´m from Colombia. I just started 
> develop in Geotools. I have gt2-2.3.0 Release,before I was working 
> with gt2-2.2.2 Realease.
>  
> I found some improves in gt2-2.3.0 Release, like the access to postgis 
> database. Also, I found that now We use a JMapPane class  instead of 
> StyledMapPane class to display a Map.
>  
> I have some problems, when I use JMapPane to display a shape, the 
> aplication ask me for a .prj file. Before, when I used  StyledMapPane 
> a .prj file wasn´t necesary. How can i fix that?. 
>
> The other problem is, my application need to load shapes files, and 
> need to load data from a database, With gt2-2.3.0 Release I can read 
> the database points but when I try to run the database some errors 
> appear. The error is the next one.
>  
> 5/01/2007 04:00:58 PM org.geotools.renderer.lite.StreamingRenderer 
> processSymbolizers
> ADVERTENCIA: null
> _java.lang.NullPointerException_
>  
> _(the rest of the error is the attach file, error.txt)_
>  
> I don´t know  was is wrong, if you cant help me with something thank 
> very much.
>  
> Please excuseme my writing but I´m learning english.
>
> Thanks very much,
>  
>
> Carlos Alberto Ruiz Lopez
> 311-3498464
>
>
>
> ------------------------------------------------------------------------
> Envía mensajes de correo electrónico directamente a tu blog con MSN. 
> Carga chistes, fotografías y muchas otras cosas. Es gratis. 
> <http://clk.atdmt.com/MSN/go/msnnksac0030000001msn/direct/01/?href=http://www.imagine-msn.com/spaces>
>  
>
> ------------------------------------------------------------------------
>
> 5/01/2007 04:00:58 PM org.geotools.renderer.lite.StreamingRenderer 
> processSymbolizers
> ADVERTENCIA: null
> java.lang.NullPointerException
>       at 
> org.geotools.referencing.operation.BufferedCoordinateOperationFactory$CRSPair.<init>(BufferedCoordinateOperationFactory.java:83)
>       at 
> org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation(BufferedCoordinateOperationFactory.java:245)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.getMathTransform(StreamingRenderer.java:2053)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1613)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1530)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1472)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:543)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:406)
>       at org.geotools.gui.swing.JMapPane.paintComponent(JMapPane.java:414)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at javax.swing.JComponent.paintChildren(Unknown Source)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at javax.swing.JComponent.paintChildren(Unknown Source)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at javax.swing.JLayeredPane.paint(Unknown Source)
>       at javax.swing.JComponent.paintChildren(Unknown Source)
>       at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)
>       at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
>       at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
>       at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
>       at java.awt.Container.paint(Unknown Source)
>       at javax.swing.JFrame.update(Unknown Source)
>       at sun.awt.RepaintArea.updateComponent(Unknown Source)
>       at sun.awt.RepaintArea.paint(Unknown Source)
>       at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
>       at java.awt.Component.dispatchEventImpl(Unknown Source)
>       at java.awt.Container.dispatchEventImpl(Unknown Source)
>       at java.awt.Window.dispatchEventImpl(Unknown Source)
>       at java.awt.Component.dispatchEvent(Unknown Source)
>       at java.awt.EventQueue.dispatchEvent(Unknown Source)
>       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
>       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>       at java.awt.EventDispatchThread.run(Unknown Source)
> 5/01/2007 04:00:58 PM org.geotools.renderer.lite.StreamingRenderer 
> processStylers
> GRAVE: null
> java.lang.NullPointerException
>       at 
> org.geotools.renderer.lite.Decimator.decimateTransformGeneralize(Decimator.java:208)
>       at 
> org.geotools.renderer.lite.Decimator.decimateTransformGeneralize(Decimator.java:115)
>       at org.geotools.renderer.lite.LiteShape2.<init>(LiteShape2.java:135)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.getTransformedShape(StreamingRenderer.java:1672)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1635)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1530)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1472)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:543)
>       at 
> org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:406)
>       at org.geotools.gui.swing.JMapPane.paintComponent(JMapPane.java:414)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at javax.swing.JComponent.paintChildren(Unknown Source)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at javax.swing.JComponent.paintChildren(Unknown Source)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at javax.swing.JLayeredPane.paint(Unknown Source)
>       at javax.swing.JComponent.paintChildren(Unknown Source)
>       at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)
>       at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
>       at javax.swing.JComponent.paint(Unknown Source)
>       at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
>       at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
>       at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
>       at java.awt.Container.paint(Unknown Source)
>       at javax.swing.JFrame.update(Unknown Source)
>       at sun.awt.RepaintArea.updateComponent(Unknown Source)
>       at sun.awt.RepaintArea.paint(Unknown Source)
>       at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
>       at java.awt.Component.dispatchEventImpl(Unknown Source)
>       at java.awt.Container.dispatchEventImpl(Unknown Source)
>       at java.awt.Window.dispatchEventImpl(Unknown Source)
>       at java.awt.Component.dispatchEvent(Unknown Source)
>       at java.awt.EventQueue.dispatchEvent(Unknown Source)
>       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
>       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>       at java.awt.EventDispatchThread.run(Unknown Source)
> 5/01/2007 04:00:58 PM org.geotools.renderer.lite.StreamingRenderer 
> processStylers
> GRAVE: null
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>   



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to