Re: [Geotools-gt2-users] EPSG on Server side
Now I created CoordinateReferenceSystem via CRSAuthorityFactory.createCoordinateReferenceSystem(String epsgCode). What if the datum has no epsg code? If I only have a datum name can I create a CoordinateReferenceSystem? I'm trying to find a way not to use EPSG code then I don't need to deal with epsg-hsql. Sun Jody Garnett wrote: Hi Lareina - taking this over to the user list... The epsg-hsql plugin needs the ability to write to disk, depending on your application server it may not have that ability. Do you have any kind of logs you could look at in order to check? Note that GeoServer is a Java EE application and it uses epsg-hsql successfully so we know it can be done. Jody This time I didn't use applet. I deployed the app onto the server and it was called as a bean. I had geoapi-nogenerics-2.1-M2.jar, gt2-referencing-2.3.2.jar, gt2-epsg-hsql-2.3.2.jar, hsqldb-1.8.0.1.jar and jsr108-0.01.jar in my class path. Before I deployed it worked well locally but when I ran the web it reported that the epsg code couldn't be found. Do I need do something on the server side? Thanks, Sun - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] EPSG on Server side
What class is allowed to do what (ie access disk) is kind of up to your classloader. Applets are loaded with a restricted classloader (that is why epsg-hsql cannot be used with an applet). Some application servers also restrict what a web applicaiton is allowed to do (I am not sure what you are running? Jetty? Tomcat? WebSphere?). So even if the geotools directory is creaed in /tmp (it may be from another run when you were testing?) - your applet or web application may not be able allowed to read it. Jody My understanding is as long as Geotools directory is created in my local /tmp then when I ask for a CRS by passing a EPSG code it should go to this /tmp directory to query in hsql database. I'm not sure about the performance monitor, does it change the policy to find the /tmp? Or it's related to how oracle form works with java bean? Sun Jody Garnett wrote: Okay... epsg-wkt works - in an application, the code using it is a Java Bean extending JPanel. This java is also called from an applet (an oracle form) - does it still work? I assume so Then we switch topics and start talking about epsg-hsql ... Your application should still work; and create a file in tmp Your applet should not work (since it is not allowed to see the disk drive) hsperf is a performance monitoring tool; perhaps you have a performance monitor going somewhere? Jody Lareina Sun wrote: Sorry to bother you so many times but I'm really confused. I think I didn't describe it clearly. I tried epsg-wkt and it works. But my java app is just a bean extending JPanel. This bean is called by oracle form which is an applet. All operation using Geotools is in the java code. Since the EPSG database can be created in my local /tmp I think the java bean should be able to access the EPSG database. There is one thing weird: it not only created Geotools directory and some hsperfdata directories in my local /tmp, it also created hsperfdata directories in /tmp on server side excluding Geotools directory. Why that happened? Thanks for your patience. Sun Jody Garnett wrote: Your applet should either use a real database installed on your sever and made available to the applet (ie epsg-oracle or epsg-postgres), or make use of something it can use on the client side (ie. epsg-wkt ). The epsg-hsql can only be used by a desktop application, or a server application (where the application container lets the web app work with some temporary files on disk). Cheers, Jody Hi, When I ran the app on the server it did create a Geotools directory in my local /tem directory. But it still doesn't work because it threw an exception to complain about no EPSG object found which can be found if running locally. Could you tell me that if the applet cannot access the EPSG database created on either the client side nor server side and I must use epsg-wkt plugin? Thanks - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] EPSG on Server side
Right. Good thing I wrote all these docs when I was trying to understand this stuff last month. The referencing Authority stuff is focused on producing a CoordinateReferenceSystem from a code as you well know. To make one by hand you can use the referencing Factory stuff. I am sorry both these things have factory in the name it is really just a mistake. - http://docs.codehaus.org/display/GEOTDOC/10+Referencing+Factories The factories (real factories create methods) described on that page can be used to build your CoordianteReferenceSystem by hand. - CRSFactory.createFromWKT is the method you want. Although I have to ask? If you are not using EPSG codes - what are you using? WKT provided by your shapefile (or user?). If you are just using the usual suspects you may find that GeoTools already provides static constants for them. I will add to the description on this page to cover the static constants GeoTools provides: - http://docs.codehaus.org/display/GEOTDOC/03+CoordinateReferenceSystem Cheers, Jody Lareina Sun wrote: Now I created CoordinateReferenceSystem via CRSAuthorityFactory.createCoordinateReferenceSystem(String epsgCode). What if the datum has no epsg code? If I only have a datum name can I create a CoordinateReferenceSystem? I'm trying to find a way not to use EPSG code then I don't need to deal with epsg-hsql. Sun Jody Garnett wrote: Hi Lareina - taking this over to the user list... The epsg-hsql plugin needs the ability to write to disk, depending on your application server it may not have that ability. Do you have any kind of logs you could look at in order to check? Note that GeoServer is a Java EE application and it uses epsg-hsql successfully so we know it can be done. Jody This time I didn't use applet. I deployed the app onto the server and it was called as a bean. I had geoapi-nogenerics-2.1-M2.jar, gt2-referencing-2.3.2.jar, gt2-epsg-hsql-2.3.2.jar, hsqldb-1.8.0.1.jar and jsr108-0.01.jar in my class path. Before I deployed it worked well locally but when I ran the web it reported that the epsg code couldn't be found. Do I need do something on the server side? Thanks, Sun - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users