PARDHU D | 24 May 2013 12:22
Picon
Favicon

Need help in creating Point

Hi to all,

Can any one please help me. When I click any place on the JMapFrame I want to get a point on the JMapFrame i.e I want to create a new point in JMapFrame. I wrote some code for this after that I don't know what I have do. Because I am not a that much programmer. Please find here attached file which contains my code.

Thanks in advance.


Regards,
D Pardhu.
Attachment (RoughCreatingPoint.java): text/x-java, 3290 bytes
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Truong Pham Minh | 24 May 2013 04:16
Picon
Favicon

Import, export dgn to shape or postgres

Hi list,
I'm trying import, export dgn to shape file by geotools. I googling for two days but no information about that. I know that maptools ogr2ogr can do something like that.
So my questions are:
Is there any way to import, export dgn to shapefile (or postgres) using geotools api?
Is there any way to execute ogr2ogr by using geotools?
Tkanhs list,
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Paige M. Baldassaro | 23 May 2013 01:45
Favicon

Factory Tutorial

I am trying to use the factory tutorial. I have created my factory just fine. However, when I try to register it, the iterator is always empty. It seems to not hit the proper line of code when registering the subRegistry. Any help would be greatly appreciated.

Paige

               Set categories = Collections.singleton(SlopeFactory.class);

       FactoryRegistry registry = new FactoryRegistry(categories);

            

       Iterator it = registry.getServiceProviders(SlopeFactory.class, false);

       if  (!it.hasNext())

       {

              System.out.println("Iterator is empty");

}

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Tom Kunicki | 21 May 2013 18:17
Picon
Favicon
Gravatar

Leaks with WFS/GML Schema handling (8.7)


We're experiencing heap leaks that appear to be related to WFS/GML schema handling.  We are currently running with GeoTools 8.7.

For background we're running a WPS server utilizing GeoTools to parse and model WFS inputs. These WFS inputs can come from a number of sources, so we deal with a large number of different schemas.  Via heap analysis, it appears we're leaking ~250 MB of schema related object instances into heap each week.   The processes running on this machine can take days to complete so a "prescribed reboot" is not an ideal option so we'd prefer to resolve the leak.

I've looked for resolutions and i've been able to come up with a reference to GEOT-3473 (http://jira.codehaus.org/browse/GEOT-3473).  The issue addressed appears to relate to leaks during unit testing, but it's not clear how one would properly clean up schema objects for a production system.  There's a comment in the GEOT-3473 there stating that no one would ever be parsing a large number of different schemas on a production system (we do!) which leads me to believe that the leak issue wasn't resolved for our use case.

Here's the abridged code we're using...


QName featureTypeSchema = GMLUtil.extractFeatureTypeSchema(file);

String schemaLocation = featureTypeSchema.getLocalPart();

SchemaRepository.registerSchemaLocation(featureTypeSchema.getNamespaceURI(), schemaLocation);

Configuration configuration = new ApplicationSchemaConfiguration(featureTypeSchema.getNamespaceURI(), schemaLocation);

InputStream is = new new BufferedInputStream( new FileInputStream(file), 16 << 10);

StreamingParser parser = new StreamingParser(configuration, inputStream, SimpleFeature.class);

while (parser.hasNext()) {

SimpleFeature feature = parser.parse();

// do something interesting
}

FileUtils.deleteQuietly(file); 
 configuration.getXSD().dispose(); // what else for schema related clean-up?


With a production environment, It's not clear from looking at GEOT-3473 what else I would need to call and if other clean-up calls would have side-effects for concurrently running parse operations.  We have multiple processing operations running concurrently with schemas potentially from the same feature type.  So a global clean-up/reset isn't a good option. 

Thanks for any insight,

Tom Kunicki
Center for Integrated Data Analytics
U.S. Geological Survey
8505 Research Way
Middleton, WI  53562



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Phil Scadden | 21 May 2013 05:00
Picon
Favicon
Gravatar

Got to bottom of bug with arcsde plugin but less certain on fixing it.

If you extract from arcSDE with a spatial filter, (BBOX,POLYGON) then it 
is filtered twice. The query to arcSDE has the spatial constraint so the 
correct no. of records is returned. However, in 
"FilteringFeatureReader.hasNext() we have:

             while (featureReader.hasNext()) {
                 peek = featureReader.next();

                 if (filter.evaluate(peek)) {
                     next = peek;
                     return true;
                 }
             }

The filter is evaluated by filter.evaluate. In most cases, the all will 
pass.

However, consider requesting only non-spatial attributes from the query. 
Ie SHAPE is not part of feature. The sde query still returns the correct 
no. of records, but filter.evaluate fails because it cant find the SHAPE 
property in the feature.

So how to fix? Ideally, when arcSDE can do the spatial operation, then 
filter shouldnt be needed. However, the same problem would then arise 
when the spatial operator is one that JTS can handle but arcSDE cant. If 
SHAPE is forced into the property list for filtering, can it be removed 
in the returned features. (The use case is with WFS when wanting a 
single attribute about overlapped polygons, but definitely not wanting 
the very complex polygon geometry coming down the wire).

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
tawisak | 20 May 2013 14:41
Picon

How to get longitude, latitude value when user click on map

Hi every body, I want to get lat, long value when user click on the map

GeodeticCalculator GC= new GeodeticCalculator();  
....
....

 System.out.println(longitude);
 System.out.println(latitude);

how can i do next ?

Thank you in advance.

chio

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/How-to-get-longitude-latitude-value-when-user-click-on-map-tp5054399.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
Ben Caradoc-Davies | 20 May 2013 05:26
Picon
Picon
Favicon

GeoTools 9.2 Released

http://geotoolsnews.blogspot.com.au/2013/05/geotools-92-released.html

The GeoTools community is pleased to announce the availability of 
GeoTools 9.2 for download from SourceForge:

http://sourceforge.net/projects/geotools/files/GeoTools%209%20Releases/9.2/geotools-9.2-bin.zip/download

http://sourceforge.net/projects/geotools/files/GeoTools%209%20Releases/9.2/geotools-9.2-doc.zip/download

http://sourceforge.net/projects/geotools/files/GeoTools%209%20Releases/9.2/geotools-9.2-userguide.zip/download

http://sourceforge.net/projects/geotools/files/GeoTools%209%20Releases/9.2/geotools-9.2-project.zip/download

This release has also been deployed to the OSGeo Maven Repository.

Please see the Release Notes for details. This release is made in 
conjunction with GeoServer 2.3.2.

In addition to bug fixes:

- The application schema support (app-schema) module now enables joining 
support by default for data sources that support it; this improvement 
and many bug fixes by Rini Angreani.

- XML parser support for unsigned numeric bindings has been added by 
Justin Deoliveira.

-Fixed transformation problems with projections based on Hotine Oblique 
Mercator (variant B) (for example Swiss CH1903 / LV03)

We would like to thank all contributors for making this release possible.

--

-- 
Ben Caradoc-Davies <Ben.Caradoc-Davies@...>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
Phil Scadden | 20 May 2013 02:54
Picon
Favicon
Gravatar

Problems building 9.2 from sourceforge snapshot.

The build of geotools fails with test failure in geotiff grid coverage 
exchange module 9.2, test Geotiffdeadlocktest

"Could not find mediaLib accelerator wrapper classes. Continuing in pure 
Java mode.
Occurs in: com.sun.media.jai.mlib.MediaLibAccessor
java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image"

Any got idea on how to proceed?

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
Emmanuel Blondel | 20 May 2013 01:30
Picon

Problem with WFSDatastore -SAXException / Type not found for OnlineResource

Hello all,

I'm using the WFSDatastorein some codeto query aGeoserver WFS. I've 
tested my code in Eclipse and works well. By the way, i've then tried to 
package the jar including the dependencies for a standalone execution. 
If i try to execute this jar in the console, then it doesn't work (see 
log below - the method initAreaDiscovery consists in getting a specific 
WFSDatastore). I'm a bit lostand do not see where is the issue.

I thank you a lot in advance if you can help solving this,

The error i get:

20 mai 2013 01:11:53 org.geotools.xml.handlers.xsi.SimpleTypeHandler 
compress
INFO: Start compressing SimpleType null
20 mai 2013 01:11:53 org.geotools.xml.handlers.xsi.SimpleTypeHandler 
compress
INFO: End compressing SimpleType null
20 mai 2013 01:11:53 org.geotools.xml.handlers.xsi.SimpleTypeHandler 
compress
INFO: Start compressing SimpleType null
20 mai 2013 01:11:53 org.geotools.xml.handlers.xsi.SimpleTypeHandler 
compress
INFO: End compressing SimpleType null
20 mai 2013 01:11:53 org.geotools.xml.XMLSAXHandler processException
GRAVE: Type not found for OnlineResource 
org.geotools.xml.handlers.ElementHandlerFactory.createE
lementHandler(ElementHandlerFactory.java:213)
org.geotools.xml.handlers.ComplexElementHandler.getHandler(ComplexElementHandler.java:542)
org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:407)
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
  Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:133)
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.parseCapabilities(WFS100ProtocolHandler.java:
66)
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.<init>(WFS100ProtocolHandler.java:47)
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:376)
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:118)
org.geotools.data.DataAccessFinder.getDataStore(DataAccessFinder.java:129)
org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:88)
org.fao.fi.IntersectionDiscovery.initAreaDiscovery(IntersectionDiscovery.java:110)
org.fao.fi.IntersectionDiscovery.<init>(IntersectionDiscovery.java:53)
org.fao.fi.Algorithm.<init>(Algorithm.java:65)
org.fao.fi.App.main(App.java:21)

20 mai 2013 01:11:53 org.geotools.xml.XMLSAXHandler startElement
ATTENTION: org.xml.sax.SAXException: Type not found for OnlineResource
20 mai 2013 01:11:53 org.geotools.xml.XMLSAXHandler startElement
ATTENTION: Line 5 Col 73
20 mai 2013 01:11:53 org.geotools.data.DataAccessFinder getDataStore
ATTENTION: Web Feature Server should be used, but could not connect
org.geotools.data.DataSourceException: Error parsing WFS 1.0.0 capabilities
         at 
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.parseCapabilities(WFS100ProtocolHandle
r.java:68)
         at 
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.<init>(WFS100ProtocolHandler.java:47)
         at 
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:376)
         at 
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:118)
         at 
org.geotools.data.DataAccessFinder.getDataStore(DataAccessFinder.java:129)
         at 
org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:88)
         at 
org.fao.fi.IntersectionDiscovery.initAreaDiscovery(IntersectionDiscovery.java:110)

         at 
org.fao.fi.IntersectionDiscovery.<init>(IntersectionDiscovery.java:53)
         at org.fao.fi.Algorithm.<init>(Algorithm.java:65)
         at org.fao.fi.App.main(App.java:21)
Caused by: org.xml.sax.SAXException: Type not found for OnlineResource
         at 
org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:425)
         at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
         at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(
Unknown Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
         at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
         at 
org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:133)
         at 
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.parseCapabilities(WFS100ProtocolHandle
r.java:66)
         ... 9 more
Caused by: org.xml.sax.SAXException: Type not found for OnlineResource
         at 
org.geotools.xml.handlers.ElementHandlerFactory.createElementHandler(ElementHandlerFactor
y.java:213)
         at 
org.geotools.xml.handlers.ComplexElementHandler.getHandler(ComplexElementHandler.java:542
)
         at 
org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:407)
         ... 22 more
Exception in thread "main" java.lang.Exception: Impossible to init Area 
Discovery
         at 
org.fao.fi.IntersectionDiscovery.<init>(IntersectionDiscovery.java:55)
         at org.fao.fi.Algorithm.<init>(Algorithm.java:65)
         at org.fao.fi.App.main(App.java:21)
Caused by: java.lang.Exception: Impossible to get DataStore for 
http://www.fao.org/figis/geoserver/a
rea/ows?service=WFS&version=1.0.0&request=GetCapabilities
         at 
org.fao.fi.IntersectionDiscovery.initAreaDiscovery(IntersectionDiscovery.java:112)

         at 
org.fao.fi.IntersectionDiscovery.<init>(IntersectionDiscovery.java:53)
         ... 2 more
Caused by: org.geotools.data.DataSourceException: Error parsing WFS 
1.0.0 capabilities
         at 
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.parseCapabilities(WFS100ProtocolHandle
r.java:68)
         at 
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.<init>(WFS100ProtocolHandler.java:47)
         at 
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:376)
         at 
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:118)
         at 
org.geotools.data.DataAccessFinder.getDataStore(DataAccessFinder.java:129)
         at 
org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:88)
         at 
org.fao.fi.IntersectionDiscovery.initAreaDiscovery(IntersectionDiscovery.java:110)

         ... 3 more
Caused by: org.xml.sax.SAXException: Type not found for OnlineResource
         at 
org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:425)
         at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
         at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(
Unknown Source)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
         at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
         at 
org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:133)
         at 
org.geotools.data.wfs.v1_0_0.WFS100ProtocolHandler.parseCapabilities(WFS100ProtocolHandle
r.java:66)
         ... 9 more
Caused by: org.xml.sax.SAXException: Type not found for OnlineResource
         at 
org.geotools.xml.handlers.ElementHandlerFactory.createElementHandler(ElementHandlerFactor
y.java:213)
         at 
org.geotools.xml.handlers.ComplexElementHandler.getHandler(ComplexElementHandler.java:542
)
         at 
org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:407)
         ... 22 more

-- 
*Emmanuel Blondel*
GIS Consultant
Engineer in Agronomy & Environment

Geographic Information Systems
in Agronomy - Environment - Fisheries
Email: emmanuel.blondel1@... - Emmanuel.Blondel@...
View my LinkedIn profileView my LinkedIn profile 
<http://fr.linkedin.com/in/emmanuelblondel1>
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Paige M. Baldassaro | 18 May 2013 15:34
Favicon

gradientMagnitude

I am trying to use the gradient magnitude to calculate slope, but I need the result in degrees, not an abstracted scale. Any help would be appreciated.

Paige

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@...
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
tawisak | 18 May 2013 06:32
Picon

Problem Calculate Between 2 Point

Hi, I am chio.

I follow tutorial 

http://svn.osgeo.org/geotools/tags/2.7-M2-GS/docs/src/main/java/org/geotools/tutorial/crs/CRSLab.java.

My output is map, so i can add button 

but my objective is add button for calculate distance between mouse click 2
point in the map

i follow  tutorial  for calculate 

http://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/GeodeticCalculator.java

but i don't know how to add point in CRSLAB.java and how to call
GeodeticCalculator.java for calculate.

Thank you in advance.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problem-Calculate-Between-2-Point-tp5054115.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d

Gmane