Re: [JPP-Devel] Deprecation with GeoPackage and spatial index

2020-02-11 Thread Rahkonen Jukka (MML)
Hi,

It seems that loosing spatial index of GeoPackage tables is a side effect of 
this changeset that was otherwise a nice improvement 
https://sourceforge.net/p/jump-pilot/code/5976/

-Jukka-

Lähettäjä: Rahkonen Jukka (MML) 
Lähetetty: keskiviikko 12. helmikuuta 2020 0.14
Vastaanottaja: jump-pilot-devel@lists.sourceforge.net
Aihe: [JPP-Devel] Deprecation with GeoPackage and spatial index

Hi,

I noticed that there has happened some deprecation with GeoPackages since 
released OpenJUMP 1.12. Version 1.12 detects and utilizes the spatial index of 
a table which makes it very fast to use even huge tables if map is zoomed close 
enough.  New snapshots do not utilize spatial index which makes OJ very slow 
with large tables. I have not yet analyzed more closely when this change has 
happened. It seems that the layer list is sorted differently now than in 1.12. 
Perhaps that change is related.

I believe that the detection is done here 
https://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDSMetadata.java#l151.

-Jukka Rahkonen-
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] Deprecation with GeoPackage and spatial index

2020-02-11 Thread Rahkonen Jukka (MML)
Hi,

I noticed that there has happened some deprecation with GeoPackages since 
released OpenJUMP 1.12. Version 1.12 detects and utilizes the spatial index of 
a table which makes it very fast to use even huge tables if map is zoomed close 
enough.  New snapshots do not utilize spatial index which makes OJ very slow 
with large tables. I have not yet analyzed more closely when this change has 
happened. It seems that the layer list is sorted differently now than in 1.12. 
Perhaps that change is related.

I believe that the detection is done here 
https://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDSMetadata.java#l151.

-Jukka Rahkonen-
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] WMS: update to default services and misleading error

2020-02-11 Thread edgar . soldin
Jukka,

wrt. both issues please try r6236.. ede

On 10.02.2020 17:01, Rahkonen Jukka (MML) wrote:
> Hi,
>
> Test results:
>
> http://deegree3-demo.deegree.org/utah-workspace/services
> Online and works
> http://wms.jpl.nasa.gov/wms.cgi
> Does not work, not found from DNS, should be removed
> http://ows.terrestris.de/osm/service
> Online and works
> http://maps.omniscale.net/wms/demo/default/service
> Online and works (not as WMS 1.3.0)
> http://www2.demis.nl/WMS/wms.ashx?wms=WorldMap
> Online and works
> http://gridca.grid.unep.ch/cgi-bin/mapserv?map=/www/geodataportal/htdocs/mod_map/geo_wms.map;
> Gives timeout, should be removed.
>
> -Jukka-
>
> -Alkuperäinen viesti-
> Lähettäjä: edgar.sol...@web.de 
> Lähetetty: maanantai 10. helmikuuta 2020 17.44
> Vastaanottaja: jump-pilot-devel@lists.sourceforge.net
> Aihe: Re: [JPP-Devel] WMS: update to default services and misleading error
>
> On 10.02.2020 16:36, Rahkonen Jukka (MML) wrote:
>> The WMS service at http://demo.opengeo.org/geoserver/wms is dead but this 
>> one can  be used instead https://demo.geo-solutions.it/geoserver/wms
>
> while we're at it, what about the other examples? are they still proper?.. ede
>
>
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6236] core/trunk/src/org/openjump/util/URLConnectionProvider.java

2020-02-11 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6236
  http://sourceforge.net/p/jump-pilot/code/6236
Author:   edso
Date: 2020-02-11 10:23:54 + (Tue, 11 Feb 2020)
Log Message:
---
fix misleading error "unknown certificate"
Connecting unreachable host, does not result in error message that the problem 
is due to unknown certificate provider anymore.

Modified Paths:
--
core/trunk/src/org/openjump/util/URLConnectionProvider.java

Modified: core/trunk/src/org/openjump/util/URLConnectionProvider.java
===
--- core/trunk/src/org/openjump/util/URLConnectionProvider.java 2020-02-11 
10:20:53 UTC (rev 6235)
+++ core/trunk/src/org/openjump/util/URLConnectionProvider.java 2020-02-11 
10:23:54 UTC (rev 6236)
@@ -1,21 +1,7 @@
 package org.openjump.util;
 
-import com.vividsolutions.jump.I18N;
-import com.vividsolutions.jump.util.Blackboard;
-import com.vividsolutions.jump.workbench.JUMPWorkbench;
-import com.vividsolutions.jump.workbench.Logger;
-import com.vividsolutions.jump.workbench.plugin.PlugInContext;
-import com.vividsolutions.jump.workbench.ui.network.ProxySettingsOptionsPanel;
-import com.vividsolutions.jump.workbench.ui.plugin.PersistentBlackboardPlugIn;
-import com.vividsolutions.wms.WMSException;
+import static javax.swing.JOptionPane.YES_NO_OPTION;
 
-import net.iharder.Base64;
-
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-import javax.swing.*;
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.URL;
@@ -22,14 +8,28 @@
 import java.net.URLConnection;
 import java.net.URLDecoder;
 import java.nio.charset.Charset;
-import java.security.KeyManagementException;
-import java.security.NoSuchAlgorithmException;
+import java.security.GeneralSecurityException;
 import java.security.cert.X509Certificate;
 import java.util.HashSet;
 import java.util.Set;
 
-import static javax.swing.JOptionPane.YES_NO_OPTION;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import javax.swing.JOptionPane;
 
+import com.vividsolutions.jump.I18N;
+import com.vividsolutions.jump.util.Blackboard;
+import com.vividsolutions.jump.workbench.JUMPWorkbench;
+import com.vividsolutions.jump.workbench.Logger;
+import com.vividsolutions.jump.workbench.plugin.PlugInContext;
+import com.vividsolutions.jump.workbench.ui.network.ProxySettingsOptionsPanel;
+import com.vividsolutions.jump.workbench.ui.plugin.PersistentBlackboardPlugIn;
+import com.vividsolutions.wms.WMSException;
+
+import net.iharder.Base64;
+
 public class URLConnectionProvider {
 
   public static String KEY = URLConnectionProvider.class.getName() + " - 
UNCERTIFIED_AUTHORIZED_URL";
@@ -130,7 +130,7 @@
   setTrustOption(false, url);
   connection.connect(); // try to connect
   return connection;// can connect
-} catch(IOException|KeyManagementException|NoSuchAlgorithmException e) {
+} catch(GeneralSecurityException e) {
   String baseURL = new URL(url.getProtocol(), url.getHost(), 
url.getPort(), url.getPath()).toString();
   if (authorizedURL.contains(baseURL) || acceptConnection(url)) {
 try {
@@ -139,7 +139,7 @@
   authorizedURL.add(baseURL);
   //setTrustOption(false, null);
   return connection;
-} catch(KeyManagementException|NoSuchAlgorithmException ex2) {
+} catch(GeneralSecurityException ex2) {
   throw new IOException(ex2);
 }
   } else {
@@ -169,13 +169,14 @@
   private Set trustedURLs = new HashSet<>();
 
   /**
+   * setDefaultSSLSocketFactory of HttpsURLConnection to a dummy trust managed
+   * in case user requested to do so, remember this choice during runtime
* 
* @param trust
* @param url
-   * @throws KeyManagementException
-   * @throws NoSuchAlgorithmException
+   * @throws GeneralSecurityException
*/
-  private void setTrustOption(boolean trust, URL url) throws 
KeyManagementException, NoSuchAlgorithmException {
+  private void setTrustOption(boolean trust, URL url) throws 
GeneralSecurityException {
 SSLContext sc = SSLContext.getInstance("SSL");
 String host = url != null ? url.getHost() : "";
 if (trust || (url != null && trustedURLs.contains(url))) {
@@ -186,6 +187,7 @@
   Logger.info("Using the system trust manager to verify certificate for 
host '"+host+"'.");
   sc.init(null, null, null);
 }
+// TODO: we should maybe not set a factory for _all_ connections here
 HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
   }
 }



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6235] core/trunk/src/org/openjump/core/ui/plugin/wms/ AddWmsLayerWizard.java

2020-02-11 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6235
  http://sourceforge.net/p/jump-pilot/code/6235
Author:   edso
Date: 2020-02-11 10:20:53 + (Tue, 11 Feb 2020)
Log Message:
---
clean out not working default wms urls

Modified Paths:
--
core/trunk/src/org/openjump/core/ui/plugin/wms/AddWmsLayerWizard.java

Modified: core/trunk/src/org/openjump/core/ui/plugin/wms/AddWmsLayerWizard.java
===
--- core/trunk/src/org/openjump/core/ui/plugin/wms/AddWmsLayerWizard.java   
2020-02-11 10:19:54 UTC (rev 6234)
+++ core/trunk/src/org/openjump/core/ui/plugin/wms/AddWmsLayerWizard.java   
2020-02-11 10:20:53 UTC (rev 6235)
@@ -36,25 +36,23 @@
 
   public static final String[] DEFAULT_URLS = new String[] {
 "http://deegree3-demo.deegree.org/utah-workspace/services;,
-"http://demo.opengeo.org/geoserver/wms;,
+//"http://demo.opengeo.org/geoserver/wms;, // dead 2020.02
 //"http://wiki.openstreetmap.org/wiki/WMS;, // does not work (missing 
WMT_MS_Capabilities)
 //"http://openaerialmap.org/wms/;,  // does not work (2013-06-09)
-"http://wms.jpl.nasa.gov/wms.cgi;,
+// "http://wms.jpl.nasa.gov/wms.cgi;, // dead 2020.02
 //"http://wms.latlon.org/?;,// does not work (missing 
WMT_MS_Capabilities)
 "http://ows.terrestris.de/osm/service;,
 "http://maps.omniscale.net/wms/demo/default/service;,
 // addresses added on 2013-06-19
 "http://www2.demis.nl/WMS/wms.ashx?wms=WorldMap;,
-
"http://gridca.grid.unep.ch/cgi-bin/mapserv?map=/www/geodataportal/htdocs/mod_map/geo_wms.map&;,
+// 
"http://gridca.grid.unep.ch/cgi-bin/mapserv?map=/www/geodataportal/htdocs/mod_map/geo_wms.map&;,
 // dead 2020.02
 "http://demo.mapserver.org/cgi-bin/wms;,
-
"http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map&;,
-
 // 
"http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/ortofoto_colore_06.map&;
 // //does not work
 
"http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/WMS_v1.3/raster/ortofoto_colore_12.map=wms=getCapabilities=1.3.0&;,
-
"https://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?
 ",
-
"https://www.gebco.net/data_and_products/gebco_web_services/north_polar_view_wms/mapserv?;,
-
"https://www.gebco.net/data_and_products/gebco_web_services/south_polar_view_wms/mapserv?;
+
"http://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?
 ",
+
"http://www.gebco.net/data_and_products/gebco_web_services/north_polar_view_wms/mapserv?;,
+
"http://www.gebco.net/data_and_products/gebco_web_services/south_polar_view_wms/mapserv?;
   };
 
   private String lastWMSVersion = WMService.WMS_1_1_1;



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6234] core/trunk/src/com/vividsolutions/wms/WMService.java

2020-02-11 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6234
  http://sourceforge.net/p/jump-pilot/code/6234
Author:   edso
Date: 2020-02-11 10:19:54 + (Tue, 11 Feb 2020)
Log Message:
---
remove dead code
routine was moved to UrlConnectionProvider

Modified Paths:
--
core/trunk/src/com/vividsolutions/wms/WMService.java

Modified: core/trunk/src/com/vividsolutions/wms/WMService.java
===
--- core/trunk/src/com/vividsolutions/wms/WMService.java2020-02-09 
16:49:52 UTC (rev 6233)
+++ core/trunk/src/com/vividsolutions/wms/WMService.java2020-02-11 
10:19:54 UTC (rev 6234)
@@ -134,66 +134,43 @@
   parser = new ParserWMS1_3();
 }
 
-try {
-  String requestUrlString = WMService.legalize(this.serverUrl.toString()) 
+ req;
-  URL requestUrl = new URL(requestUrlString);
+String requestUrlString = WMService.legalize(this.serverUrl.toString()) + 
req;
+URL requestUrl = new URL(requestUrlString);
 
-  InputStream inputStream = new BasicRequest(this, 
requestUrl).getInputStream();
-  cap = parser.parseCapabilities(this, inputStream);
-  String url1 = cap.getService().getServerUrl();
-  String url2 = cap.getGetMapURL();
+InputStream inputStream = new BasicRequest(this, 
requestUrl).getInputStream();
+cap = parser.parseCapabilities(this, inputStream);
+String url1 = cap.getService().getServerUrl();
+String url2 = cap.getGetMapURL();
 
-  String compare_url1 = UriUtil.urlStripAuth(legalize(url1));
-  String compare_url2 = UriUtil.urlStripAuth(legalize(url2));
-  // if the difference is only in credentials then use url1 else ask from
-  // user
-  if (!compare_url1.equals(compare_url2) && alertDifferingURL) {
-int resp = showConfirmDialog(
-null,
-
I18N.getMessage("com.vididsolutions.wms.WMService.Other-GetMap-URL-Found", 
url2),
-null,
-YES_NO_OPTION);
-// nope. user wants to keep the initial url
-if (resp == NO_OPTION) {
-  cap.setGetMapURL(url1);
-}
-// make sure url2 has auth info if needed
-else if (!UriUtil.urlGetUser(url1).isEmpty()) {
-  String url2_withAuth = UriUtil.urlAddCredentials(url2,
-  UriUtil.urlGetUser(url1), UriUtil.urlGetPassword(url1));
-  cap.setGetMapURL(url2_withAuth);
-}
-  } else {
-// changed 24.06.2011 (Wilfried Hornburg, LGLN) url1 --> url2; 
original:
-// cap.setGetMapURL(url1);
-// revert to url1, following Jukka's advice a discussion is on-going on
-// JPP mailing list
+String compare_url1 = UriUtil.urlStripAuth(legalize(url1));
+String compare_url2 = UriUtil.urlStripAuth(legalize(url2));
+// if the difference is only in credentials then use url1 else ask from
+// user
+if (!compare_url1.equals(compare_url2) && alertDifferingURL) {
+  int resp = showConfirmDialog(
+  null,
+  
I18N.getMessage("com.vididsolutions.wms.WMService.Other-GetMap-URL-Found", 
url2),
+  null,
+  YES_NO_OPTION);
+  // nope. user wants to keep the initial url
+  if (resp == NO_OPTION) {
 cap.setGetMapURL(url1);
   }
-} catch(SSLHandshakeException ex) {
-  /*
-  int r = JOptionPane.showConfirmDialog(
-  null,
-  
I18N.getMessage("com.vididsolutions.wms.WMService.UnverifiedCertificate",
-  // create a new URL to hide user/password
-  new URL(serverUrl.getProtocol(), serverUrl.getHost(), 
serverUrl.getPort(), serverUrl.getFile())
-  ),
-  "Confirmation dialog",
-  YES_NO_OPTION,
-  JOptionPane.WARNING_MESSAGE);
-
-  if (r==JOptionPane.YES_OPTION) {
-try {
-  setTrustOption(true, serverUrl);
-} catch(KeyManagementException|NoSuchAlgorithmException ex2) {
-  throw new IOException(ex2);
-}
-initialize(alertDifferingURL);
-  } else throw new IOException(ex);
-  */
-  throw new IOException(ex);
+  // make sure url2 has auth info if needed
+  else if (!UriUtil.urlGetUser(url1).isEmpty()) {
+String url2_withAuth = UriUtil.urlAddCredentials(url2,
+UriUtil.urlGetUser(url1), UriUtil.urlGetPassword(url1));
+cap.setGetMapURL(url2_withAuth);
+  }
+} else {
+  // changed 24.06.2011 (Wilfried Hornburg, LGLN) url1 --> url2; original:
+  // cap.setGetMapURL(url1);
+  // revert to url1, following Jukka's advice a discussion is on-going on
+  // JPP mailing list
+  cap.setGetMapURL(url1);
 }
 
+
 // [2016.01 ede] deactivated the error handling here as it leads to an
 // infinite stack loop when trying to open a project containing a wms layer
 // that can't be connected for some reason show error, close errordialog,