You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(39) |
Dec
(70) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(52) |
Feb
(168) |
Mar
(248) |
Apr
(143) |
May
(418) |
Jun
(558) |
Jul
(702) |
Aug
(311) |
Sep
(141) |
Oct
(350) |
Nov
(172) |
Dec
(182) |
| 2003 |
Jan
(320) |
Feb
(362) |
Mar
(356) |
Apr
(218) |
May
(447) |
Jun
(203) |
Jul
(745) |
Aug
(494) |
Sep
(175) |
Oct
(422) |
Nov
(554) |
Dec
(162) |
| 2004 |
Jan
(217) |
Feb
(353) |
Mar
(228) |
Apr
(407) |
May
(211) |
Jun
(270) |
Jul
(264) |
Aug
(198) |
Sep
(268) |
Oct
(227) |
Nov
(118) |
Dec
(47) |
| 2005 |
Jan
(207) |
Feb
(243) |
Mar
(297) |
Apr
(197) |
May
(281) |
Jun
(166) |
Jul
(164) |
Aug
(92) |
Sep
(155) |
Oct
(196) |
Nov
(189) |
Dec
(114) |
| 2006 |
Jan
(129) |
Feb
(219) |
Mar
(274) |
Apr
(213) |
May
(245) |
Jun
(220) |
Jul
(376) |
Aug
(347) |
Sep
(179) |
Oct
(493) |
Nov
(448) |
Dec
(339) |
| 2007 |
Jan
(304) |
Feb
(273) |
Mar
(237) |
Apr
(186) |
May
(215) |
Jun
(320) |
Jul
(229) |
Aug
(313) |
Sep
(331) |
Oct
(279) |
Nov
(347) |
Dec
(266) |
| 2008 |
Jan
(332) |
Feb
(280) |
Mar
(203) |
Apr
(277) |
May
(301) |
Jun
(356) |
Jul
(292) |
Aug
(203) |
Sep
(277) |
Oct
(142) |
Nov
(210) |
Dec
(239) |
| 2009 |
Jan
(250) |
Feb
(193) |
Mar
(174) |
Apr
(183) |
May
(342) |
Jun
(230) |
Jul
(292) |
Aug
(161) |
Sep
(204) |
Oct
(280) |
Nov
(281) |
Dec
(175) |
| 2010 |
Jan
(113) |
Feb
(106) |
Mar
(199) |
Apr
(166) |
May
(298) |
Jun
(147) |
Jul
(175) |
Aug
(192) |
Sep
(71) |
Oct
(79) |
Nov
(58) |
Dec
(55) |
| 2011 |
Jan
(83) |
Feb
(169) |
Mar
(142) |
Apr
(207) |
May
(311) |
Jun
(183) |
Jul
(218) |
Aug
(190) |
Sep
(158) |
Oct
(197) |
Nov
(93) |
Dec
(74) |
| 2012 |
Jan
(92) |
Feb
(50) |
Mar
(64) |
Apr
(45) |
May
(100) |
Jun
(70) |
Jul
(3) |
Aug
(1) |
Sep
(2) |
Oct
(5) |
Nov
(7) |
Dec
(4) |
| 2013 |
Jan
(6) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(3) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2014 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(3) |
May
(3) |
Jun
(1) |
Jul
|
Aug
(4) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: James M. <jma...@us...> - 2001-12-09 16:06:42
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools
In directory usw-pr-cvs1:/tmp/cvs-serv14901/uk/ac/leeds/ccg/geotools
Modified Files:
ShapefileReader.java
Log Message:
removed even more of the code for threaded loading as there was still a data race occuring.
Index: ShapefileReader.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/ShapefileReader.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -w -C2 -d -r1.32 -r1.33
*** ShapefileReader.java 2001/11/21 13:37:28 1.32
--- ShapefileReader.java 2001/12/09 16:06:40 1.33
***************
*** 85,97 ****
name = base.getFile();
loader = new Loader();
! loader.start();
//the following block of code effectivly dissables the threaded loading system for now
! try{
loader.join();
}
catch(InterruptedException ie){
System.err.println("Shapefile not loaded by loader "+ie);
! }
System.out.println("Shapefile Constructor Finished - tread loading disabled");
}
--- 85,98 ----
name = base.getFile();
loader = new Loader();
! //loader.start();
//the following block of code effectivly dissables the threaded loading system for now
! /*try{
loader.join();
}
catch(InterruptedException ie){
System.err.println("Shapefile not loaded by loader "+ie);
! }*/
! loader.run();//bypass threading and run from here
System.out.println("Shapefile Constructor Finished - tread loading disabled");
}
***************
*** 271,275 ****
}
! map.notifyLayerChangedListeners(LayerChangedEvent.DATA);
}
--- 272,276 ----
}
! //map.notifyLayerChangedListeners(LayerChangedEvent.DATA);
}
***************
*** 534,538 ****
data.setName(colName);
AddDataWhenReady dataWatch = new AddDataWhenReady(data,colName);
! dataWatch.start();
return data;
}
--- 535,539 ----
data.setName(colName);
AddDataWhenReady dataWatch = new AddDataWhenReady(data,colName);
! dataWatch.run();//run directly instead of as a thread...
return data;
}
***************
*** 636,640 ****
class Loader extends Thread{
public void run(){
! System.out.println("Hello from sf threaded loader!");
String sub="";
--- 637,641 ----
class Loader extends Thread{
public void run(){
! //System.out.println("Hello from sf threaded loader!");
String sub="";
|
|
From: James M. <jma...@us...> - 2001-12-08 20:28:39
|
Update of /cvsroot/geotools/website/php
In directory usw-pr-cvs1:/tmp/cvs-serv11728
Modified Files:
geotools_base.php
Log Message:
added spanish flag to end user link
Index: geotools_base.php
===================================================================
RCS file: /cvsroot/geotools/website/php/geotools_base.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -w -C2 -d -r1.3 -r1.4
*** geotools_base.php 2001/11/30 20:40:14 1.3
--- geotools_base.php 2001/12/08 20:28:37 1.4
***************
*** 193,197 ****
echo '<ul>';
echo '<li class=boxbody_small><A HREF="/help/enduser.html">As an end user</a>';
! echo '<br>A guide for non programmers.';
echo '<li class=boxbody_small><A HREF="/help/solutionBuilder.html">As a solution builder</a>';
echo '<br>A guide for novice programmers who want to customize applets</a>';
--- 193,198 ----
echo '<ul>';
echo '<li class=boxbody_small><A HREF="/help/enduser.html">As an end user</a>';
! echo '<br>A guide for non programmers.<a
! href="/help/enduser_es.html"><img src="../images/flag_es.gif" alt="en español" border=0></a>';
echo '<li class=boxbody_small><A HREF="/help/solutionBuilder.html">As a solution builder</a>';
echo '<br>A guide for novice programmers who want to customize applets</a>';
|
|
From: James M. <jma...@us...> - 2001-12-08 20:20:44
|
Update of /cvsroot/geotools/website/help In directory usw-pr-cvs1:/tmp/cvs-serv10165 Modified Files: enduser_es.html Log Message: Added links Index: enduser_es.html =================================================================== RCS file: /cvsroot/geotools/website/help/enduser_es.html,v retrieving revision 1.1 retrieving revision 1.2 diff -w -C2 -d -r1.1 -r1.2 *** enduser_es.html 2001/12/08 19:52:55 1.1 --- enduser_es.html 2001/12/08 20:20:41 1.2 *************** *** 36,41 **** <BR> Primero, descomprime el archivo zip utilizando tu descompresor preferido. Si no tienes acceso a ningún ! programa descompresor para descomprimir ficheros zip, envia una solicitud de soporte <http://sourceforge.net/tracker/?group_id=4091> ! y haremos todo lo posible para enviarte los ficheros de otro formato.<BR> <BR> Una vez descomprimido, verás un fichero llamado "readme.html" y un directorio llamado "demonstrations".<BR> --- 36,41 ---- <BR> Primero, descomprime el archivo zip utilizando tu descompresor preferido. Si no tienes acceso a ningún ! programa descompresor para descomprimir ficheros zip, envia una <A HREF="http://sourceforge.net/tracker/?group_id=4091">solicitud ! de soporte</A> y haremos todo lo posible para enviarte los ficheros de otro formato.<BR> <BR> Una vez descomprimido, verás un fichero llamado "readme.html" y un directorio llamado "demonstrations".<BR> *************** *** 114,118 **** así que es recomanable tenerlo disponible.<BR> ! <H2>Como colocar tu mapa en el web</H2> <P>Supongamos que tienes un 'shapefile' propio y que quieres colocarlo en un sitio web. Cómo lo haces?<BR> <BR> --- 114,118 ---- así que es recomanable tenerlo disponible.<BR> ! <H2>Como colocar tu mapa en el web:</H2> <P>Supongamos que tienes un 'shapefile' propio y que quieres colocarlo en un sitio web. Cómo lo haces?<BR> <BR> *************** *** 120,125 **** <BR> Guarda una copia de Example1.html, llamada, por ejemplo, MiMapa.html.<BR> ! Pon tus ficheros 'shapefile' en el directorio de mapas (o pon los tres ficheros allí por separados o los ! comprime en un sólo fichero .zip).<BR> <BR> Cambia la etiqueta 'param' en MiMapa.html de manera que el valor equivalga al nombre y la posición de tu --- 120,125 ---- <BR> Guarda una copia de Example1.html, llamada, por ejemplo, MiMapa.html.<BR> ! Pon tus ficheros 'shapefile' en el directorio de mapas (o pon los tres ficheros allí por separados o comprímelos ! en un sólo fichero .zip).<BR> <BR> Cambia la etiqueta 'param' en MiMapa.html de manera que el valor equivalga al nombre y la posición de tu *************** *** 188,195 **** de una capa en el 'viewer', o te interese un otro tipo de interactividad, o quieras enlazar a otro tipo de gráfico. Si es así, tienes 3 opciones:<BR> - <BR> - Primero, ve a la página de applets: <http://geotools.sourceforge.net/demos.php><BR> <BR> ! Se puede configurar a muchos de los applets que se encuentran allí, utilizando etiquetas param. Es posible que hagan lo que necesitas.<BR> <BR> --- 188,195 ---- de una capa en el 'viewer', o te interese un otro tipo de interactividad, o quieras enlazar a otro tipo de gráfico. Si es así, tienes 3 opciones:<BR> <BR> ! Primero, ve a la <A HREF="http://geotools.sourceforge.net/demos.php">página de applets.</A></P> ! ! <P>Se puede configurar a muchos de los applets que se encuentran allí, utilizando etiquetas param. Es posible que hagan lo que necesitas.<BR> <BR> *************** *** 201,205 **** La última opción es de arriesgarte tú mismo/a y aprender un poco de Java para que puedas hacer soluciones personalizadas tu mismo/a. Si quieres hacer eso, deberias leer la próxima guía de introducción ! para "los que crean soluciones" (solution builders) <solutionBuilder.html><BR> <H2>Resolución de problemas y como buscar ayuda:</H2> --- 201,206 ---- La última opción es de arriesgarte tú mismo/a y aprender un poco de Java para que puedas hacer soluciones personalizadas tu mismo/a. Si quieres hacer eso, deberias leer la próxima guía de introducción ! para "<A HREF="solutionBuilder.html">creadores de soluciones</A>" (solution builders) (disponible de ! momento sólo en inglés)<BR> <H2>Resolución de problemas y como buscar ayuda:</H2> *************** *** 231,236 **** darte de alta en la lista y enviar tu pregunta para que todos podamos darle vueltas.<BR> <BR> ! Para ver més detalles sobre el archivo de la lista de distribución y para darte de alta, ve a geotools-discussion ! <http://lists.sourceforge.net/lists/listinfo/geotools-discussion> <BR> --- 232,237 ---- darte de alta en la lista y enviar tu pregunta para que todos podamos darle vueltas.<BR> <BR> ! Para ver més detalles sobre el archivo de la lista de distribución y para darte de alta, ve a <A ! HREF="http://lists.sourceforge.net/lists/listinfo/geotools-discussion">geotools-discussion</A>.<BR> |
|
From: James M. <jma...@us...> - 2001-12-08 20:07:14
|
Update of /cvsroot/geotools/website/images In directory usw-pr-cvs1:/tmp/cvs-serv7863 Added Files: flag_es.gif Log Message: flag for marking documents that are available in spanish --- NEW FILE: flag_es.gif --- GIF89a üxüA3ýþÁ<>Ð ä§h&N²³ÙºGøÿñÀ>ÿÿ r;wðäѳO0P£F¥ !Â-¨hÒ¨Yæ>O¥NzÌ2Y´|zÕ%¬X¨T!RÄÈ$I,yf. RvÄpâ`J 7¬äøÂÈãÇ |
|
From: James M. <jma...@us...> - 2001-12-08 19:52:58
|
Update of /cvsroot/geotools/website/help In directory usw-pr-cvs1:/tmp/cvs-serv5133 Added Files: enduser_es.html Log Message: Spanish version of the getting started guide for end users --- NEW FILE: enduser_es.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"> <META NAME="GENERATOR" Content="Visual Page 2.0 for Windows"> <META NAME="Author" Content="Linda Oxnard"> <TITLE>untitled</TITLE> </HEAD> <BODY> <H1>Guía de introducción a GeoTools para usuarios finales</H1> <P> <H2>Requisitos:</H2> <P>Este documento no supone conocimientos previos de Java ni experiencia de SIG (GIS).<BR> <BR> Sin embargo, se precisa, al menos, algunos conocimientos de HTML para poder colocar mapas en tu sitio web y algunos mapas propios, de ser posible en formato Shapefile ESRI (tm) (aunque se puede empezar con los datos contenidos en los demos)<BR> <H2>Como empezar:</H2> <P>Primero, hace falta descargar la última copia del paquete de ejemplos y demos de GeoTools. El fichero se llama demos.zip. Se puede descargar de la <A HREF="http://geotools.org/dload.php">página de descarga</A>.<BR> <BR> De momento, no te preocupes por los otros ficheros que se encuentran allí. Sólo los vas a necesitar si decides seguir trabajando con GeoTools como un 'solution builder' (creador/a de soluciones) o como un desarrollador.<BR> <BR> También necesitas un navegador que soporte Java 1.1, por ejemplo Netscape 4.06 o superior / Internet Explorer 5 o superior. (Si eliges decargar el navegador, ten en cuenta que deberias elegir la opción de instalar Java, ya que en algunas de las versiones recientes no se incluye por defecto).<BR> <H2>Qué puedo hacer con los ejemplos?</H2> <P>Es de esperar que ya tengas una copia de demos.zip y un navegador 'java-permitido' (java-enabled). Ahora miramos el proceso necesario para hacer funcionar los demos.<BR> <BR> Primero, descomprime el archivo zip utilizando tu descompresor preferido. Si no tienes acceso a ningún programa descompresor para descomprimir ficheros zip, envia una solicitud de soporte <http://sourceforge.net/tracker/?group_id=4091> y haremos todo lo posible para enviarte los ficheros de otro formato.<BR> <BR> Una vez descomprimido, verás un fichero llamado "readme.html" y un directorio llamado "demonstrations".<BR> <BR> Abre el fichero readme.html en tu navegador y haz clic sobre 'view' (por debajo de ejemplo 1). Esta acción abrirá una de las páginas de la cartera de demonstraciones, la cual, depués de una pausa breve, deberia mostrar una mapa sencilla de Estados Unidos.<BR> <BR> Si el mapa no aparece, mira la sección llamada 'trouble shooting' (resolución de problemas) al final de esta página.<BR> <BR> Supongamos que ya tienes una mapa visualizada en la pantalla. Intenta utilizar los tres botones que aparecen en la parte inferior del mapa. Haz clic en el botón 'zoom' y luego arrastra un rectángulo sobre una región de la mapa. El mapa hará un zoom sobre la región que has seleccionado. Haz clic en el botón 'pan' y luego haz clic y mantén presionado el botón izquierda del ratón sobre el mapa para arrastrarlo.<BR> <BR> Por último, haz clic en el botón 'reset'. Así ajustarás la vista para que demuestre el mapa completo de los EEUU.<BR> <BR> Puedes volver a la página de readme.html y probar otros ejemplos si quieres ver más ejemplos de GeoTools en acción.<BR> <H3>Miramos los ficheros en más detalle:</H3> <P>Cómo funcionan los demos arriba mencionados y qué ficheros se utilizan para que funcionen?</P> <P>Cada demo necesita 5 ficheros:</P> <UL> <LI>un fichero 'HTML' - contiene todo lo que aparece en la página web y proporciona información al applet que demostrará el mapa. <LI>un fichero 'class' - controla la forma del mapa y sus controles <UL> <LI>geotools.jar - el fichero principal - proporciona todas las capacidades de cartografia <LI>collections.jar - una biblioteca de soporte, escrita por Sun, que está utilizada por GeoTools <LI>support.jar - un fichero de soporte adicional <LI>un fichero 'zip' - contiene la información cartográfica que utiliza el applet de mapeo (map applet) </UL> </UL> <P>En el caso de ejemplo 1, los ficheros que se necesitan son:<BR> <BR> demonstrations\Example1.html <BR> demonstrations\Example1.class <BR> demonstrations\jars\geotools.jar <BR> demonstrations\jars\support.jar<BR> demonstrations\jars\collections.jar <BR> demonstrations\maps\statepop.zip<BR> <BR> Si miramos cada fichero por separado, el primero es la página web. Si lo abres en un editor verás que, por la mayor parte, es como cualquier otra página HTML. La parte interesante es la sección que se encuentra entre las etiquetas 'applet':<BR> <BR> <APPLET ARCHIVE="jars/geotools.jar,jars/support.jar,jars/collections.jar" CODE="Example1.class" WIDTH="430" HEIGHT="270" ALIGN="BOTTOM"> <BR> <PARAM NAME="shapefile" VALUE="maps/statepop"> <BR> </APPLET><BR> <BR> Si miramos este código detalladamente, vemos que lo primero que hace es declarar que se va a utilizar un applet. La etiqueta 'archive' proporciona la posición de las dos bibliotecas de soporte - geotools.jar y collections.jar. La etiqueta 'code' da nombre al fichero 'class' que se debe utilizar, mientras que las etiquetas 'width' (anchura), 'height' (altura) y 'align' (alineación) indican qué tan grande debe ser el applet.<BR> <BR> A continuación, hay una etiqueta 'param'. Éste es un parámetro que está utilizado por el applet. En este caso, se denomina 'shapefile' y toma el valor de la posición del fichero cartográfico que se debe utilizar. Fíjate que no se pone la extensión '.zip'.<BR> <BR> Por último, la etiqueta 'applet' se cierra y el resto de la página es de html estándard.<BR> <BR> Los ficheros geotools.jar y collections.jar son ficheros de biblioteca, nada más, y son requeridos por cada applet GeoTools. No es necesario cambiar nada.<BR> <BR> Si abres el fichero 'statepop.zip' usando un descompresor, verás que contiene tres ficheros: .shp, .shx y .dbf. GeoTools sólo precisa los ficheros .shp y .dbf., pero la mayoria de los 'shapefiles' contienen los tres, y es posible que versiones posteriores de GeoTools utilicen el fichero .shx (que es un índice), así que es recomanable tenerlo disponible.<BR> <H2>Como colocar tu mapa en el web</H2> <P>Supongamos que tienes un 'shapefile' propio y que quieres colocarlo en un sitio web. Cómo lo haces?<BR> <BR> Empieza con ejemplo 1, ya que éste es el mas fácil de montar:<BR> <BR> Guarda una copia de Example1.html, llamada, por ejemplo, MiMapa.html.<BR> Pon tus ficheros 'shapefile' en el directorio de mapas (o pon los tres ficheros allí por separados o los comprime en un sólo fichero .zip).<BR> <BR> Cambia la etiqueta 'param' en MiMapa.html de manera que el valor equivalga al nombre y la posición de tu 'shapefile'.<BR> <BR> Abre la página html en tu navegador y tu mapa debe aparecer.<BR> <BR> GeoTools no necesita ningún soporte al lado del servidor, así que, siempre que todos los ficheros necesarios estén colocados en tu sitio web, el mapa deberia estar visualizado para que todos lo vean.<BR> <H2>Como modificar los demos más avanzados:</H2> <P><BR> Los próximos tres demos, ejemplos 2, 3 y 4, introducen cada uno características adicionales que hacen parecer más interesantes los mapas.<BR> <BR> Ejemplo 2 añade un parámetro que permite al mapa mostrar ToolTips (pequeños carteles de ayuda que aparecen en la pantalla y proporcionan información sobre algún que otra característica cuando el puntero se deja sobre ella).<BR> <BR> Si miras la etiqueta 'applet' de Ejemplo 2, verás lo siguiente:<BR> <BR> <APPLET ARCHIVE="jars/geotools.jar,jars/support.jar,jars/collections.jar" CODE="Example2.class" WIDTH="430" HEIGHT="270" ALIGN="BOTTOM"> <BR> <PARAM NAME="shapefile" VALUE="maps/statepop"> <BR> <PARAM NAME="tooltip" VALUE="STATE_NAME"> <BR> </APPLET><BR> <BR> El nuevo parámetro tiene el nombre 'tooltip' y su valor equivale al nombre de una columna de datos que se puede encontrar en el fichero .dbf: en este caso, el nombre es, STATE_NAME.<BR> <BR> Si conoces el nombre de cualquiera de las columnas en el fichero .dbf de tu mapa, intenta cambiar este parámetro para mostrar tooltips en tu mapa. Ten presente que, dentro de la etiqueta applet, el parámetro CODE tiene el valor "Example2.class". No es suficiente añadir una etiqueta param al fichero Example1.html, ya que el applet no está configurado para visualizarlos.<BR> <BR> Ejemplo 3, extiende el concepto de una manera similar. Esta vez, se usa el nombre de una columna numérica, y GeoTools lo utiliza para sombrear el mapa. En este caso, se usa la columna UNEMPLOY, que representa el desempleo ('unemployment' en inglés).<BR> <BR> <APPLET ARCHIVE="jars/geotools.jar,jars/support.jar,jars/collections.jar" CODE="Example3.class" WIDTH="430" HEIGHT="270" ALIGN="BOTTOM"> <BR> <PARAM NAME="shapefile" VALUE="maps/statepop"> <BR> <PARAM NAME="shadeby" VALUE="UNEMPLOY"> <BR> <PARAM NAME="tooltip" VALUE="STATE_NAME"> <BR> </APPLET><BR> <BR> Una característica interesante de este applet es que, si haces doble clic sobre la llave aparecerá una caja que te permite cambiar la manera en que la mapa se sombrea.<BR> <BR> Otra vez, si conoces el nombre de una columna numérica de tu shapefile, puedes cambiar las etiquetas 'param' para que tu mapa se sombree utilizando estos datos.<BR> <BR> Ejemplo 4 no añade ningún parámetro nuevo, pero sí que incluye un 'widget' de control adicional que hace posible cambiar los niveles de zoom.<BR> <BR> El demo final del paquete, en el momento de escribir estas líneas, es el demo GraphApplet que muestra algunas de las capacidades más interactivas de GeoTools. <BR> <BR> Mira las etiquetas param en este demo y a ver si logras entender como utilizar tus propios datos en el applet.<BR> <H2>Como crear tus propios applets:</H2> <P><BR> Puede ser que estás contento de utilizar uno de los applets del paquete de demos tal cual. Si es así, no tienes que hacer nada más. Basta con colocar los ficheros en un sitio web y publicar tus mapas. Pero qué pasa si ninguno de los applets hace precisamente lo que quieres? Tal vez quieras visualizar más de una capa en el 'viewer', o te interese un otro tipo de interactividad, o quieras enlazar a otro tipo de gráfico. Si es así, tienes 3 opciones:<BR> <BR> Primero, ve a la página de applets: <http://geotools.sourceforge.net/demos.php><BR> <BR> Se puede configurar a muchos de los applets que se encuentran allí, utilizando etiquetas param. Es posible que hagan lo que necesitas.<BR> <BR> Si ninguno de los applets parece adecuado, la segunda opción que tienes es pedir que alguien, (quizás nosotros), haga un applet personalizado que sí que esté adecuado. Si representas a una corporación adinerada que tiene un presupuesto que te quema las manos, puedes encargarnos que te preparamos una solución personalizada. Si no, es probable que uno de nosotros pueda ayudarte en el tiempo libre.<BR> <BR> La última opción es de arriesgarte tú mismo/a y aprender un poco de Java para que puedas hacer soluciones personalizadas tu mismo/a. Si quieres hacer eso, deberias leer la próxima guía de introducción para "los que crean soluciones" (solution builders) <solutionBuilder.html><BR> <H2>Resolución de problemas y como buscar ayuda:</H2> <P>Si ninguno de los applets hace lo que necesitas, puedes presentar una solicitud de soporte al sitio web de GeoTools a SourceForge. Para facilitarnos las cosas, siempre dinos el sistema operativo que utilizas y la versión del navegador. Si sabes como hacerlo, también nos ayudaria que nos envie una copia de cualquier mensaje que aparezca en la consola Java de tu navegador.<BR> <BR> nb: Aunque los principales desarrolladores de GeoTools no entienden español, la administradora del proyecto sí que lo entiende, así que, si no puedes enviar tus solicitudes de soporte en inglés pues ... hazlo en español :) <BR> <BR> Para presentar una solicitud de soporte, ve a la página principal del proyecto a: <BR> <http://sourceforge.net/projects/geotools/><BR> <BR> Elige la opción "support" de la lista que aparece a la parte superior de la página. En la próxima página, elige "submit" .<BR> <BR> No hace falta ser miembro de SourceForge para poder utilizar este formulario. Sin embargo, si eres miembro de SourceForge podrás utilizar el sitio web para vigilar el progreso de tu solicitud.<BR> <BR> Elige "getting started" de la lista de categorias y luego danos un sumario (y cualquier otro detalle que te occurra).<BR> <BR> Si logras hacer funcionar algunos de los applets pero te causa problemas algún aspecto específico de ellos, o no puedes configurarlo todo como quieres, tienes dos opciones. La primera es de rellenar el formulario "solicitud de soporte" arriba mencionado. La segunda es de mirar el archivo de la lista de distribución 'geotools-discussion' para ver si el problema que tienes tú ya ha surgido antes. Si no es así, puedes darte de alta en la lista y enviar tu pregunta para que todos podamos darle vueltas.<BR> <BR> Para ver més detalles sobre el archivo de la lista de distribución y para darte de alta, ve a geotools-discussion <http://lists.sourceforge.net/lists/listinfo/geotools-discussion> <BR> </BODY> </HTML> |
|
From: James M. <jma...@us...> - 2001-12-07 18:16:11
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets
In directory usw-pr-cvs1:/tmp/cvs-serv7300/uk/ac/leeds/ccg/widgets
Modified Files:
MinMaxSlider.java
Log Message:
fixed bug in scale calulation
Index: MinMaxSlider.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets/MinMaxSlider.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -w -C2 -d -r1.3 -r1.4
*** MinMaxSlider.java 2001/12/07 09:18:30 1.3
--- MinMaxSlider.java 2001/12/07 18:16:08 1.4
***************
*** 88,91 ****
--- 88,92 ----
public void setMinValue(int minValue) {
this.minValue = minValue;
+ setMinSelected(minValue);
repaint();
}
***************
*** 181,185 ****
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)((pix+minValue)/scale);
}
--- 182,186 ----
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)((pix/scale)+minValue);
}
***************
*** 188,192 ****
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)((val*scale)-minValue);
}
--- 189,193 ----
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)((val-minValue)*scale);
}
***************
*** 203,206 ****
--- 204,208 ----
public void setMaxValue(int maxValue) {
this.maxValue = maxValue;
+ this.setMaxSelected(maxValue);
repaint();
}
|
|
From: James M. <jma...@us...> - 2001-12-07 18:14:32
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools
In directory usw-pr-cvs1:/tmp/cvs-serv6819/uk/ac/leeds/ccg/geotools
Modified Files:
PolygonLayer.java
Log Message:
removed noisy comment
Index: PolygonLayer.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/PolygonLayer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -w -C2 -d -r1.9 -r1.10
*** PolygonLayer.java 2001/12/04 17:36:44 1.9
--- PolygonLayer.java 2001/12/07 18:14:27 1.10
***************
*** 92,96 ****
*/
public void addGeoPolygon(GeoPolygon polygon, boolean keepQuiet) {
- System.out.println("Forcing buffer flush");
this.setForceBufferFlush(true);
super.addGeoShape(polygon, keepQuiet);
--- 92,95 ----
|
|
From: Ian T. <ian...@us...> - 2001-12-07 11:01:37
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/raster
In directory usw-pr-cvs1:/tmp/cvs-serv4747/uk/ac/leeds/ccg/raster
Modified Files:
ImageLayer.java
Log Message:
Removed unnecessary calls for updates in paint method
Index: ImageLayer.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/raster/ImageLayer.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -w -C2 -d -r1.29 -r1.30
*** ImageLayer.java 2001/11/22 11:00:01 1.29
--- ImageLayer.java 2001/12/07 11:01:33 1.30
***************
*** 30,37 ****
private Image image = null;
private GeoRectangle bbox = null;
- private MediaTracker tracker;
private int myID = 1;
private final static boolean DEBUG=false;
private Canvas obs = new Canvas();
private Toolkit tk;
private URL src = null;
--- 30,37 ----
private Image image = null;
private GeoRectangle bbox = null;
private int myID = 1;
private final static boolean DEBUG=false;
private Canvas obs = new Canvas();
+ private MediaTracker tracker=new MediaTracker(obs);
private Toolkit tk;
private URL src = null;
***************
*** 52,58 ****
bbox = bounds;
this.image = image;
! tracker = new MediaTracker(new Frame());
! tracker.addImage(this.image,0);
! this.setStatus(Layer.COMPLETED);
}
--- 52,60 ----
bbox = bounds;
this.image = image;
! tracker.addImage(this.image,++myID);
! this.setStatus(Layer.LOADING);
! thread = new Thread(this);
! thread.setPriority(Thread.MIN_PRIORITY);
! thread.start();
}
***************
*** 61,65 ****
this.src = source;
this.src_stream = null;
! //if (DEBUG) System.out.println("ImageLayer.changeImage= "+src);
changeImage(bounds);
}
--- 63,67 ----
this.src = source;
this.src_stream = null;
! if (DEBUG) System.out.println("ImageLayer.changeImage= "+src);
changeImage(bounds);
}
***************
*** 135,148 ****
public void paintScaled(GeoGraphics gg)
{
! // Print out a call stack
! //if(DEBUG) {
! // try {
! // throw new RuntimeException();
! // } catch (RuntimeException e) {
! // System.out.println("IL ("+this+")-->paintScaled call stack ");
! // e.printStackTrace();
! // }
! //}
!
double cellSizeX = 0;
double cellSizeY = 0;
--- 137,141 ----
public void paintScaled(GeoGraphics gg)
{
! if(DEBUG)System.out.println("Painting imagelayer");
double cellSizeX = 0;
double cellSizeY = 0;
***************
*** 156,161 ****
GeoRectangle out = gr.createIntersect(me);
! //if(DEBUG)System.out.println("IL-->gr "+gr+"\nme "+me+"\nout "+out);
! //if(DEBUG)System.out.println("IL-->getStatus="+this.getStatus());
int gh,gw;
if(DEBUG)System.out.println("IL ("+this+") -->0");
--- 149,153 ----
GeoRectangle out = gr.createIntersect(me);
! if(DEBUG)System.out.println("IL-->getStatus="+this.getStatus());
int gh,gw;
if(DEBUG)System.out.println("IL ("+this+") -->0");
***************
*** 164,173 ****
if(out.equals(me)){
! if(DEBUG)System.out.println("IL ("+this+") -->2 ");
! //if(DEBUG)System.out.println("IL-->No clip");
//GeoRectangle out = bbox;
int origin[]=scale.toGraphics(out.x,out.y);
gh=scale.toGraphics(out.height);
gw=scale.toGraphics(out.width);
if(this.image!=null){
drawn = g.drawImage(
--- 156,171 ----
if(out.equals(me)){
! //if(DEBUG)System.out.println("IL ("+this+") -->2 ");
! if(DEBUG)System.out.println("IL-->No clip ("+this+")");
//GeoRectangle out = bbox;
int origin[]=scale.toGraphics(out.x,out.y);
gh=scale.toGraphics(out.height);
gw=scale.toGraphics(out.width);
+ if(getStatus()!=Layer.COMPLETED){
+ if(DEBUG)System.out.println("Not ready returning");
+ g.setColor(Color.red);
+ g.drawRect(origin[0]+1,origin[1]-gh-1,gw-1,gh-1);
+ return;
+ }
if(this.image!=null){
drawn = g.drawImage(
***************
*** 178,197 ****
gh,
null);
- try {
- tracker.waitForID(myID);
- } catch (InterruptedException e) {
- System.out.println("IL-->Interupted while drawing");
- setStatus(Layer.ERRORED);
- return;
- }
if(DEBUG)System.out.println("IL ("+this+") -->3 drawn="+drawn);
- }
- //if((this.getStatus()&Layer.COMPLETED)==Layer.COMPLETED){
- // if(DEBUG)System.out.println("IL ("+this+") -->4 ");
- // g.setColor(Color.red);
- // g.drawRect(origin[0]+1,origin[1]-gh-1,gw-1,gh-1);
- //}
}
! else{
if(DEBUG)System.out.println("IL ("+this+") -->5 ");
if((this.getStatus()&Layer.COMPLETED)!=Layer.COMPLETED) {
--- 176,182 ----
gh,
null);
if(DEBUG)System.out.println("IL ("+this+") -->3 drawn="+drawn);
}
! } else{ // clipping required
if(DEBUG)System.out.println("IL ("+this+") -->5 ");
if((this.getStatus()&Layer.COMPLETED)!=Layer.COMPLETED) {
***************
*** 202,209 ****
//complex clip case
MemoryImageSource source;
! cellSizeX = me.width/this.image.getWidth(
! new Frame());
! cellSizeY = me.height/this.image.getHeight(
! new Frame());
int x,y,width,height;
if(out.y%cellSizeY>0){
--- 187,192 ----
//complex clip case
MemoryImageSource source;
! cellSizeX = me.width/this.image.getWidth(obs);
! cellSizeY = me.height/this.image.getHeight(obs);
int x,y,width,height;
if(out.y%cellSizeY>0){
***************
*** 211,234 ****
out.height+=cellSizeY;
}
- // out.x=out.x-(out.x%cellSizeX);
x=(int)Math.floor(((out.x-me.x)/cellSizeX));
y=(int)Math.ceil(((me.y-out.y+me.height-out.height)/cellSizeY));
width=(int)Math.ceil((out.width/cellSizeX));
height=(int)Math.ceil(((out.height)/cellSizeY));
- // out.x=out.x-(out.x%cellSizeX);
x=(int)Math.floor(((out.x-me.x)/cellSizeX));
- //y=(int)Math.ceil(((out.y-me.y+out.height)/cellSizeY));
- //h=(int)Math.ceil(((out.height)/cellsize));
- //mh=(int)Math.ceil(((me.height)/cellsize));
- //gh=(int)Math.ceil(((gr.height)/cellsize));
- //top=(int)Math.ceil(((out.y)/cellsize))+h;
- //mtop=(int)Math.ceil(((me.y)/cellsize))+mh;
- //y=(int)(Math.max(Math.ceil(out.y),Math.ceil(me.y))/cellSizeY);
y=(int)Math.ceil(((me.y-out.y+me.height-out.height)/cellSizeY));
! // if(DEBUG)System.out.println("IL-->start "+x+" "+y);
width=(int)Math.ceil((out.width/cellSizeX));
height=(int)Math.ceil(((out.height)/cellSizeY));
! //if(DEBUG)System.out.println("IL-->w/h "+width+" "+height);
y=Math.max(y,0);
int[] data = new int[(height*width)];
PixelGrabber pg = new PixelGrabber(
--- 194,217 ----
out.height+=cellSizeY;
}
x=(int)Math.floor(((out.x-me.x)/cellSizeX));
y=(int)Math.ceil(((me.y-out.y+me.height-out.height)/cellSizeY));
width=(int)Math.ceil((out.width/cellSizeX));
height=(int)Math.ceil(((out.height)/cellSizeY));
x=(int)Math.floor(((out.x-me.x)/cellSizeX));
y=(int)Math.ceil(((me.y-out.y+me.height-out.height)/cellSizeY));
! if(DEBUG)System.out.println("IL-->start "+x+" "+y);
width=(int)Math.ceil((out.width/cellSizeX));
height=(int)Math.ceil(((out.height)/cellSizeY));
! if(DEBUG)System.out.println("IL-->w/h "+width+" "+height);
y=Math.max(y,0);
+ int origin[]=scale.toGraphics(out.x,out.y);
+ gh=scale.toGraphics(out.height);
+ gw=scale.toGraphics(out.width);
+ if((this.getStatus()&Layer.COMPLETED)!=Layer.COMPLETED){
+ if(DEBUG)System.out.println("IL ("+this+") -->6 ");
+ g.setColor(Color.red);
+ g.drawRect(origin[0],origin[1]-gh,gw,gh);
+ return;
+ }
int[] data = new int[(height*width)];
PixelGrabber pg = new PixelGrabber(
***************
*** 254,281 ****
source = new MemoryImageSource(width,height,data,0,width);
Image image2 = obs.createImage(source);
- int origin[]=scale.toGraphics(out.x,out.y);
- gh=scale.toGraphics(out.height);
- gw=scale.toGraphics(out.width);
drawn=g.drawImage(image2,origin[0],origin[1]-gh,gw,gh,obs);
- try {
- tracker.waitForID(myID);
- } catch (InterruptedException e) {
- System.out.println("IL-->Interupted while drawing");
- setStatus(Layer.ERRORED);
- return;
- }
if(DEBUG)System.out.println("IL ("+this+") -->5.1 drawn="+drawn);
image2=null;
- if((this.getStatus()&Layer.COMPLETED)!=Layer.COMPLETED){
- if(DEBUG)System.out.println("IL ("+this+") -->6 ");
- g.setColor(Color.red);
- g.drawRect(origin[0],origin[1]-gh,gw,gh);
- }
}
}
}
! protected byte[] getImageData(java.io.InputStream instr)
! {
byte[] res = null;
try {
--- 237,248 ----
source = new MemoryImageSource(width,height,data,0,width);
Image image2 = obs.createImage(source);
drawn=g.drawImage(image2,origin[0],origin[1]-gh,gw,gh,obs);
if(DEBUG)System.out.println("IL ("+this+") -->5.1 drawn="+drawn);
image2=null;
}
}
}
! protected byte[] getImageData(java.io.InputStream instr) {
byte[] res = null;
try {
***************
*** 299,304 ****
public void run() {
setStatus(Layer.PENDING);
! if(DEBUG) System.out.println(
! "IL--> Request image " + this.src + " " + bbox);
// Start getting the image. If the image is .gif or .jpg then
--- 266,270 ----
public void run() {
setStatus(Layer.PENDING);
! if(DEBUG) System.out.println("IL--> Request image " + this.src + " " + bbox);
// Start getting the image. If the image is .gif or .jpg then
***************
*** 312,316 ****
//}
//if((type!=null) && type.startsWith("image")){
- Frame dummy = new Frame();
Toolkit tk = Toolkit.getDefaultToolkit();
// if(type.trim().endsWith("gif")
--- 278,281 ----
***************
*** 337,343 ****
// }
// if(DEBUG)System.out.println(
! // "IL--> Image Width="+this.image.getWidth(dummy));
- if(tracker==null)tracker = new MediaTracker(dummy);
tracker.addImage(this.image,++myID);
try {
--- 302,307 ----
// }
// if(DEBUG)System.out.println(
! // "IL--> Image Width="+this.image.getWidth(obs));
tracker.addImage(this.image,++myID);
try {
***************
*** 360,366 ****
setStatus(Layer.ABORTED);
if(DEBUG)System.out.println("IL ("+this+")-->Image Aborted ");
- //}else if(state == tracker.ERRORED){
- // setStatus(Layer.ERRORED);
- // if(DEBUG)System.out.println("IL ("+this+")-->Image Error ");
}else {
setStatus(Layer.ERRORED);
--- 324,327 ----
***************
*** 383,386 ****
--- 344,350 ----
*
* $Log$
+ * Revision 1.30 2001/12/07 11:01:33 ianturton
+ * Removed unnecessary calls for updates in paint method
+ *
* Revision 1.29 2001/11/22 11:00:01 kobit
* Separated image data loading from image creating and some comments added
|
|
From: James M. <jma...@us...> - 2001-12-07 09:18:33
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets
In directory usw-pr-cvs1:/tmp/cvs-serv28014
Modified Files:
MinMaxSlider.java
Log Message:
Change event now only broadcast when mouse is released
Index: MinMaxSlider.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets/MinMaxSlider.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -w -C2 -d -r1.2 -r1.3
*** MinMaxSlider.java 2001/12/06 18:16:27 1.2
--- MinMaxSlider.java 2001/12/07 09:18:30 1.3
***************
*** 136,140 ****
bg.setColor(getArrowHeadColor());
! System.out.println(""+p[0]+","+p[1]);
bg.fillPolygon(new int[]{width-barWidth+1,width-1,width-(barWidth/2),width-barWidth+1},new int[]{p[0],p[0],p[0]+(barWidth/2),p[0]},4);
--- 136,140 ----
bg.setColor(getArrowHeadColor());
! //System.out.println(""+p[0]+","+p[1]);
bg.fillPolygon(new int[]{width-barWidth+1,width-1,width-(barWidth/2),width-barWidth+1},new int[]{p[0],p[0],p[0]+(barWidth/2),p[0]},4);
***************
*** 234,238 ****
int old = this.minSelected;
this.minSelected = minSelected;
! this.propertySupport.firePropertyChange(this.PROP_MINSELECTED_PROPERTY,new Integer(old),new Integer(minSelected));
repaint();
}
--- 234,238 ----
int old = this.minSelected;
this.minSelected = minSelected;
! //this.propertySupport.firePropertyChange(this.PROP_MINSELECTED_PROPERTY,new Integer(old),new Integer(minSelected));
repaint();
}
***************
*** 252,256 ****
int old = maxSelected;
this.maxSelected = maxSelected;
! this.propertySupport.firePropertyChange(this.PROP_MAXSELECTED_PROPERTY,new Integer(old),new Integer(maxSelected));
repaint();
}
--- 252,256 ----
int old = maxSelected;
this.maxSelected = maxSelected;
! //this.propertySupport.firePropertyChange(this.PROP_MAXSELECTED_PROPERTY,new Integer(old),new Integer(maxSelected));
repaint();
}
***************
*** 272,276 ****
--- 272,279 ----
startValue=value;
break;
+ default:
+ return;
}
+
}
***************
*** 282,285 ****
--- 285,289 ----
public void mouseReleased(java.awt.event.MouseEvent mouseEvent) {
+ this.propertySupport.firePropertyChange("Value Changed",null,null);
}
static final int NOTHING=1,TOP=2,MID=3,BOTTOM=4;
***************
*** 302,306 ****
else whatToMove = NOTHING;
startValue = pixToVal(y);
! System.out.println("Presed "+whatToMove);
}
--- 306,310 ----
else whatToMove = NOTHING;
startValue = pixToVal(y);
! //System.out.println("Presed "+whatToMove);
}
|
|
From: James M. <jma...@us...> - 2001-12-06 18:16:29
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets
In directory usw-pr-cvs1:/tmp/cvs-serv9194
Modified Files:
MinMaxSlider.java
Log Message:
added labels
Index: MinMaxSlider.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets/MinMaxSlider.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -w -C2 -d -r1.1 -r1.2
*** MinMaxSlider.java 2001/12/05 16:25:39 1.1
--- MinMaxSlider.java 2001/12/06 18:16:27 1.2
***************
*** 88,91 ****
--- 88,92 ----
public void setMinValue(int minValue) {
this.minValue = minValue;
+ repaint();
}
***************
*** 120,124 ****
if(screenBuffer == null)bg=g;
else bg = screenBuffer.getGraphics();
!
bg.setColor(getBackground());
bg.fillRect(0,0,width,height);
--- 121,125 ----
if(screenBuffer == null)bg=g;
else bg = screenBuffer.getGraphics();
! bg.setFont(getFont());
bg.setColor(getBackground());
bg.fillRect(0,0,width,height);
***************
*** 141,146 ****
bg.setColor(getForeground());
! bg.drawString(""+getMinSelected(),width-barWidth-20,p[0]);
! bg.drawString(""+getMaxSelected(),width-barWidth-20,p[1]);
if(screenBuffer!=null){
g.drawImage(screenBuffer, 0,0,this);
--- 142,154 ----
bg.setColor(getForeground());
!
!
! String min = asLabel(getMinSelected());
! String max = asLabel(getMaxSelected());
! FontMetrics fm = this.getFontMetrics(getFont());
! int len = fm.stringWidth(asLabel(getMinSelected()));
! bg.drawString(min,width-barWidth-len,p[0]);
! len = fm.stringWidth(asLabel(getMaxSelected()));
! bg.drawString(max,width-barWidth-len,p[1]);
if(screenBuffer!=null){
g.drawImage(screenBuffer, 0,0,this);
***************
*** 148,151 ****
--- 156,171 ----
}
+ public String asLabel(int value){
+ String result = ""+value;
+ if(value<0){
+ result = result.substring(1);
+ result = result+" "+negativeSuffix;
+ }
+ else{
+ result = result+" "+positiveSuffex;
+ }
+ return result;
+ }
+
protected int[] getLimits(){
double valRange = maxValue-minValue;
***************
*** 161,165 ****
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)(pix*scale)+minValue;
}
--- 181,185 ----
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)((pix+minValue)/scale);
}
***************
*** 168,172 ****
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)((val/scale)-minValue);
}
--- 188,192 ----
double pixRange = getSize().height;
double scale = pixRange/valRange;
! return (int)((val*scale)-minValue);
}
***************
*** 183,186 ****
--- 203,207 ----
public void setMaxValue(int maxValue) {
this.maxValue = maxValue;
+ repaint();
}
***************
*** 213,218 ****
int old = this.minSelected;
this.minSelected = minSelected;
- repaint();
this.propertySupport.firePropertyChange(this.PROP_MINSELECTED_PROPERTY,new Integer(old),new Integer(minSelected));
}
--- 234,239 ----
int old = this.minSelected;
this.minSelected = minSelected;
this.propertySupport.firePropertyChange(this.PROP_MINSELECTED_PROPERTY,new Integer(old),new Integer(minSelected));
+ repaint();
}
***************
*** 236,241 ****
public void mouseDragged(java.awt.event.MouseEvent mouseEvent) {
! //System.out.println("start "+startValue+" now "+value+" "+(value-startValue));
int value = pixToVal(mouseEvent.getY());
switch(whatToMove){
case TOP:
--- 257,263 ----
public void mouseDragged(java.awt.event.MouseEvent mouseEvent) {
!
int value = pixToVal(mouseEvent.getY());
+ //System.out.println("start "+startValue+" now "+value+" diff "+(value-startValue));
switch(whatToMove){
case TOP:
***************
*** 265,269 ****
--- 287,295 ----
int startValue;
+ /** Holds value of property negativeSuffix. */
+ private String negativeSuffix = "BCE";
+ /** Holds value of property positiveSuffex. */
+ private String positiveSuffex = "CE";
public void mousePressed(java.awt.event.MouseEvent mouseEvent) {
***************
*** 297,300 ****
--- 323,354 ----
public void setBarBackgroundColor(java.awt.Color barBackgroundColor) {
this.barBackgroundColor = barBackgroundColor;
+ }
+
+ /** Getter for property negativeSuffix.
+ * @return Value of property negativeSuffix.
+ */
+ public String getNegativeSuffix() {
+ return negativeSuffix;
+ }
+
+ /** Setter for property negativeSuffix.
+ * @param negativeSuffix New value of property negativeSuffix.
+ */
+ public void setNegativeSuffix(String negativeSuffix) {
+ this.negativeSuffix = negativeSuffix;
+ }
+
+ /** Getter for property positiveSuffex.
+ * @return Value of property positiveSuffex.
+ */
+ public String getPositiveSuffex() {
+ return positiveSuffex;
+ }
+
+ /** Setter for property positiveSuffex.
+ * @param positiveSuffex New value of property positiveSuffex.
+ */
+ public void setPositiveSuffex(String positiveSuffex) {
+ this.positiveSuffex = positiveSuffex;
}
|
|
From: James M. <jma...@us...> - 2001-12-05 16:25:42
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/widgets
In directory usw-pr-cvs1:/tmp/cvs-serv13886/uk/ac/leeds/ccg/widgets
Added Files:
MinMaxSlider.java
Log Message:
First working version
--- NEW FILE: MinMaxSlider.java ---
/*
* MinMaxSlider.java
*
* Created on December 5, 2001, 10:53 AM
*/
package uk.ac.leeds.ccg.widgets;
import java.beans.*;
import java.awt.*;
/**
*
* @author jamesm
* @version
*/
public class MinMaxSlider extends java.awt.Component implements java.io.Serializable,java.awt.event.MouseMotionListener,java.awt.event.MouseListener {
private static final String PROP_MINSELECTED_PROPERTY = "MinSelected";
private static final String PROP_MAXSELECTED_PROPERTY = "MaxSelected";
private PropertyChangeSupport propertySupport;
/** Holds value of property arrowHeadColor. */
private java.awt.Color arrowHeadColor=Color.black;
/** Holds value of property minValue. */
private int minValue=0;
/** Holds value of property selectionColor. */
private java.awt.Color selectionColor=Color.pink;
/** Holds value of property maxValue. */
private int maxValue=100;
/** Holds value of property barWidth. */
private int barWidth=10;
/** Holds value of property minSelected. */
private int minSelected=20;
/** Holds value of property maxSelected. */
private int maxSelected=40;
/** Holds value of property barBackgroundColor. */
private java.awt.Color barBackgroundColor = Color.white;
/** Creates new MinMaxSlider */
public MinMaxSlider() {
propertySupport = new PropertyChangeSupport( this );
addMouseMotionListener(this);
addMouseListener(this);
}
public void addPropertyChangeListener(PropertyChangeListener listener) {
propertySupport.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
propertySupport.removePropertyChangeListener(listener);
}
/** Getter for property arrowHeadColor.
* @return Value of property arrowHeadColor.
*/
public java.awt.Color getArrowHeadColor() {
return arrowHeadColor;
}
/** Setter for property arrowHeadColor.
* @param arrowHeadColor New value of property arrowHeadColor.
*/
public void setArrowHeadColor(java.awt.Color arrowHeadColor) {
this.arrowHeadColor = arrowHeadColor;
}
/** Getter for property minValue.
* @return Value of property minValue.
*/
public int getMinValue() {
return minValue;
}
/** Setter for property minValue.
* @param minValue New value of property minValue.
*/
public void setMinValue(int minValue) {
this.minValue = minValue;
}
/** Getter for property selectionColor.
* @return Value of property selectionColor.
*/
public java.awt.Color getSelectionColor() {
return selectionColor;
}
/** Setter for property selectionColor.
* @param selectionColor New value of property selectionColor.
*/
public void setSelectionColor(java.awt.Color selectionColor) {
this.selectionColor = selectionColor;
}
Image screenBuffer;
public void update(Graphics g){
paint(g);
}
public void paint(java.awt.Graphics g) {
int width = getSize().width;
int height = getSize().height;
Graphics bg;
if(screenBuffer == null){
screenBuffer = this.createImage(width,height);
}
if(screenBuffer == null)bg=g;
else bg = screenBuffer.getGraphics();
bg.setColor(getBackground());
bg.fillRect(0,0,width,height);
bg.setColor(getForeground());
bg.fillRect(width-barWidth,0,barWidth,height);
bg.setColor(getBarBackgroundColor());
bg.fillRect(width-barWidth+2,2,barWidth-4,height-4);
int [] p = getLimits();
bg.setColor(getSelectionColor());
bg.fillRect(width-barWidth+2,p[0],barWidth-4,p[1]-p[0]);
bg.setColor(getArrowHeadColor());
System.out.println(""+p[0]+","+p[1]);
bg.fillPolygon(new int[]{width-barWidth+1,width-1,width-(barWidth/2),width-barWidth+1},new int[]{p[0],p[0],p[0]+(barWidth/2),p[0]},4);
bg.fillPolygon(new int[]{width-barWidth+1,width-1,width-(barWidth/2),width-barWidth+1},new int[]{p[1],p[1],p[1]-(barWidth/2),p[1]},4);
bg.setColor(getForeground());
bg.drawString(""+getMinSelected(),width-barWidth-20,p[0]);
bg.drawString(""+getMaxSelected(),width-barWidth-20,p[1]);
if(screenBuffer!=null){
g.drawImage(screenBuffer, 0,0,this);
}
}
protected int[] getLimits(){
double valRange = maxValue-minValue;
double pixRange = getSize().height;
double scale = pixRange/valRange;
int top = valToPix(minSelected);
int bottom = valToPix(maxSelected);
return new int[]{top,bottom};
}
protected int pixToVal(int pix){
double valRange = maxValue-minValue;
double pixRange = getSize().height;
double scale = pixRange/valRange;
return (int)(pix*scale)+minValue;
}
protected int valToPix(int val){
double valRange = maxValue-minValue;
double pixRange = getSize().height;
double scale = pixRange/valRange;
return (int)((val/scale)-minValue);
}
/** Getter for property maxValue.
* @return Value of property maxValue.
*/
public int getMaxValue() {
return maxValue;
}
/** Setter for property maxValue.
* @param maxValue New value of property maxValue.
*/
public void setMaxValue(int maxValue) {
this.maxValue = maxValue;
}
/** Getter for property barWidth.
* @return Value of property barWidth.
*/
public int getBarWidth() {
return barWidth;
}
/** Setter for property barWidth.
* @param barWidth New value of property barWidth.
*/
public void setBarWidth(int barWidth) {
this.barWidth = barWidth;
}
/** Getter for property minSelected.
* @return Value of property minSelected.
*/
public int getMinSelected() {
return minSelected;
}
/** Setter for property minSelected.
* @param minSelected New value of property minSelected.
*/
public void setMinSelected(int minSelected) {
if(minSelected>getMaxSelected())minSelected = getMaxSelected()-1;
int old = this.minSelected;
this.minSelected = minSelected;
repaint();
this.propertySupport.firePropertyChange(this.PROP_MINSELECTED_PROPERTY,new Integer(old),new Integer(minSelected));
}
/** Getter for property maxSelected.
* @return Value of property maxSelected.
*/
public int getMaxSelected() {
return maxSelected;
}
/** Setter for property maxSelected.
* @param maxSelected New value of property maxSelected.
*/
public void setMaxSelected(int maxSelected) {
if(maxSelected<=getMinSelected())maxSelected = getMinSelected()+1;
int old = maxSelected;
this.maxSelected = maxSelected;
this.propertySupport.firePropertyChange(this.PROP_MAXSELECTED_PROPERTY,new Integer(old),new Integer(maxSelected));
repaint();
}
public void mouseDragged(java.awt.event.MouseEvent mouseEvent) {
//System.out.println("start "+startValue+" now "+value+" "+(value-startValue));
int value = pixToVal(mouseEvent.getY());
switch(whatToMove){
case TOP:
setMinSelected(value);
break;
case BOTTOM:
setMaxSelected(value);
break;
case MID:
setMinSelected(getMinSelected()+value-startValue);
setMaxSelected(getMaxSelected()+value-startValue);
startValue=value;
break;
}
}
public void mouseMoved(java.awt.event.MouseEvent mouseEvent) {
}
public void mouseExited(java.awt.event.MouseEvent mouseEvent) {
}
public void mouseReleased(java.awt.event.MouseEvent mouseEvent) {
}
static final int NOTHING=1,TOP=2,MID=3,BOTTOM=4;
int whatToMove;
int startValue;
public void mousePressed(java.awt.event.MouseEvent mouseEvent) {
int y = mouseEvent.getY();
int p[] = getLimits();
if (y<p[0]) whatToMove = NOTHING;
else if (y<p[0]+5) whatToMove = TOP;
else if(y<p[1]-5)whatToMove = MID;
else if(y<p[1]) whatToMove = BOTTOM;
else whatToMove = NOTHING;
startValue = pixToVal(y);
System.out.println("Presed "+whatToMove);
}
public void mouseClicked(java.awt.event.MouseEvent mouseEvent) {
}
public void mouseEntered(java.awt.event.MouseEvent mouseEvent) {
}
/** Getter for property barBackgroundColor.
* @return Value of property barBackgroundColor.
*/
public java.awt.Color getBarBackgroundColor() {
return barBackgroundColor;
}
/** Setter for property barBackgroundColor.
* @param barBackgroundColor New value of property barBackgroundColor.
*/
public void setBarBackgroundColor(java.awt.Color barBackgroundColor) {
this.barBackgroundColor = barBackgroundColor;
}
}
|
|
From: James M. <jma...@us...> - 2001-12-04 17:37:23
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/sfsql
In directory usw-pr-cvs1:/tmp/cvs-serv5294/uk/ac/leeds/ccg/sfsql
Modified Files:
PostGISDataSource.java PostGISTester.java
Log Message:
work to improve performance
Index: PostGISDataSource.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/sfsql/PostGISDataSource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -w -C2 -d -r1.1 -r1.2
*** PostGISDataSource.java 2001/12/04 09:24:09 1.1
--- PostGISDataSource.java 2001/12/04 17:37:19 1.2
***************
*** 26,33 ****
public void connect(String server,String database,String user,String passwd) throws SQLException{
try {
! Class.forName("org.postgresql.Driver");
! } catch(java.lang.ClassNotFoundException e) {
! System.err.print("DaS->ClassNotFoundException: ");
System.err.println("DaS->"+e.getMessage());
}
--- 26,35 ----
public void connect(String server,String database,String user,String passwd) throws SQLException{
try {
! System.out.println("Loading driver");
! Driver drv = new org.postgresql.Driver();
! // Class.forName("org.postgresql.Driver");
! } catch(Exception e) {
! // System.err.print("DaS->ClassNotFoundException: ");
System.err.println("DaS->"+e.getMessage());
}
***************
*** 97,101 ****
case Geometry.MULTIPOLYGON:
GeoPolygon poly = convertMultiPolygon(id,(MultiPolygon)geom.getGeometry());
! //System.out.println("poly bounds "+poly.getBounds());
l.addGeoPolygon(poly);
--- 99,103 ----
case Geometry.MULTIPOLYGON:
GeoPolygon poly = convertMultiPolygon(id,(MultiPolygon)geom.getGeometry());
! System.out.println("poly bounds "+poly.getBounds());
l.addGeoPolygon(poly);
Index: PostGISTester.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/sfsql/PostGISTester.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -w -C2 -d -r1.3 -r1.4
*** PostGISTester.java 2001/12/04 09:25:07 1.3
--- PostGISTester.java 2001/12/04 17:37:19 1.4
***************
*** 29,36 ****
f.add(view,"Center");
f.add(new ToolBar(view),"South");
//MixedLayer l = server.getFeatures(bounds);
PostGISLayer pgl = new PostGISLayer(server,bounds);
Theme t = new Theme(pgl);
! //f.add(new uk.ac.leeds.ccg.widgets.ToolBar(view),"South");
f.setVisible(true);
view.addTheme(t);
--- 29,37 ----
f.add(view,"Center");
f.add(new ToolBar(view),"South");
+ view.setMapExtent(bounds);
//MixedLayer l = server.getFeatures(bounds);
PostGISLayer pgl = new PostGISLayer(server,bounds);
Theme t = new Theme(pgl);
! f.add(new uk.ac.leeds.ccg.widgets.ToolBar(view),"South");
f.setVisible(true);
view.addTheme(t);
|
|
From: James M. <jma...@us...> - 2001-12-04 17:36:47
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools
In directory usw-pr-cvs1:/tmp/cvs-serv5110/uk/ac/leeds/ccg/geotools
Modified Files:
PolygonLayer.java
Log Message:
moved order in which forceFlush was called
Index: PolygonLayer.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/PolygonLayer.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -w -C2 -d -r1.8 -r1.9
*** PolygonLayer.java 2001/12/04 16:05:01 1.8
--- PolygonLayer.java 2001/12/04 17:36:44 1.9
***************
*** 92,97 ****
*/
public void addGeoPolygon(GeoPolygon polygon, boolean keepQuiet) {
super.addGeoShape(polygon, keepQuiet);
- setForceBufferFlush(true);
}
--- 92,98 ----
*/
public void addGeoPolygon(GeoPolygon polygon, boolean keepQuiet) {
+ System.out.println("Forcing buffer flush");
+ this.setForceBufferFlush(true);
super.addGeoShape(polygon, keepQuiet);
}
|
|
From: James M. <jma...@us...> - 2001-12-04 16:05:04
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools
In directory usw-pr-cvs1:/tmp/cvs-serv12533
Modified Files:
PolygonLayer.java
Log Message:
Now clears cached scaled objects when new features are added
Index: PolygonLayer.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/PolygonLayer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -w -C2 -d -r1.7 -r1.8
*** PolygonLayer.java 2001/06/15 11:19:00 1.7
--- PolygonLayer.java 2001/12/04 16:05:01 1.8
***************
*** 93,96 ****
--- 93,97 ----
public void addGeoPolygon(GeoPolygon polygon, boolean keepQuiet) {
super.addGeoShape(polygon, keepQuiet);
+ setForceBufferFlush(true);
}
|
|
From: James M. <jma...@us...> - 2001-12-04 15:49:42
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/sfsql
In directory usw-pr-cvs1:/tmp/cvs-serv7617
Added Files:
PostGISLayer.java
Log Message:
An experimental layer for displaying the contents of a postGIS database
--- NEW FILE: PostGISLayer.java ---
/*
* PostGISLayer.java
*
* Created on 01 December 2001, 01:36
*/
package uk.ac.leeds.ccg.sfsql;
import uk.ac.leeds.ccg.geotools.*;
/**
*
* @author James Macgill
* @version
*/
public class PostGISLayer extends MixedLayer implements Runnable{
PostGISDataSource featureSource;
GeoRectangle last;
/** Creates new PostGISLayer */
public PostGISLayer(PostGISDataSource featureSource,GeoRectangle initalExtent) {
super.setBounds(initalExtent);
this.featureSource = featureSource;
updateFeatures(initalExtent);
}
public void paintScaled(GeoGraphics g){
GeoRectangle bbox = g.getScale().getMapExtent();
if(!bbox.equals(last)){
updateFeatures(bbox);
}
super.paintScaled(g);
}
public void updateFeatures(GeoRectangle bounds){
last = bounds;
Thread updater = new Thread(this);
updater.start();
}
public void run() {
try{
featureSource.addFeatures(this,(GeoRectangle)last.clone());
System.out.println("New features in place");
}
catch(Exception e){
System.err.println("Update failed "+e);
e.printStackTrace();
}
}
}
|
|
From: James M. <jma...@us...> - 2001-12-04 09:25:10
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/sfsql
In directory usw-pr-cvs1:/tmp/cvs-serv6456
Modified Files:
PostGISTester.java
Log Message:
Updated to use new PostGISDataSource.java
Index: PostGISTester.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/sfsql/PostGISTester.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -w -C2 -d -r1.2 -r1.3
*** PostGISTester.java 2001/11/04 13:45:03 1.2
--- PostGISTester.java 2001/12/04 09:25:07 1.3
***************
*** 10,13 ****
--- 10,14 ----
import org.postgis.*;
import uk.ac.leeds.ccg.geotools.*;
+ import uk.ac.leeds.ccg.widgets.*;
import java.awt.*;
/**
***************
*** 20,130 ****
/** Creates new Tester */
public PostGISTester() throws Exception {
! //jdbc:oracle:thin:@feathers.leeds.ac.uk:1521:pfoss
! String url = "jdbc:postgresql://feathers.leeds.ac.uk/postgis";
! try {
! Class.forName("org.postgresql.Driver");
!
! } catch(java.lang.ClassNotFoundException e) {
! System.err.print("DaS->ClassNotFoundException: ");
! System.err.println("DaS->"+e.getMessage());
! }
! java.sql.Connection conn = DriverManager.getConnection(url,"postgis","postgis");
! //DataSource data = new DataSource(con);
! ((org.postgresql.Connection)conn).addDataType("geometry","org.postgis.PGgeometry");
! ((org.postgresql.Connection)conn).addDataType("box3d","org.postgis.PGbox3d");
!
! /*
! * Create a statement and execute a select query.
! */
! // WHERE geo_value && 'BOX3D(400000 400000 0,500000 500000 0)'::box3d
! PGbox3d box3d = new PGbox3d(new org.postgis.Point(400000,400000),new org.postgis.Point(410000,410000));
! Statement s = conn.createStatement();
! System.out.println(box3d);
! ResultSet size = s.executeQuery("select count (*) from yh_eds where geo_value && '"+box3d+"'::box3d");
! while(size.next()){
! System.out.println(size.getString(1));
! }
Frame f = new Frame();
f.setSize(500,500);
Viewer view = new Viewer();
f.add(view,"Center");
! MixedLayer l = new MixedLayer();
! //pl.setScaleBuffer(false);
! ResultSet r = s.executeQuery("select geo_value from yh_eds where geo_value && '"+box3d+"'::box3d");
! while( r.next() ) {
! /*
! * Retrieve the geometry as an object then cast it to the geometry type.
! * Print things out.
! */
! PGgeometry geom = (PGgeometry)r.getObject(1);
! //int id = r.getInt(2);
! //System.out.println("Row " + id + ":");
!
!
! //System.out.println(geom.getGeoType());
! switch (geom.getGeoType()){
! case Geometry.POINT:
! case Geometry.MULTIPOINT:
! case Geometry.GEOMETRYCOLLECTION:
! case Geometry.LINESTRING:
! case Geometry.MULTILINESTRING:
! System.out.println("Geometry type not supported");
! break;
! case Geometry.POLYGON:
! System.out.println("A polygon!");
! break;
! case Geometry.MULTIPOLYGON:
! GeoPolygon poly = convertMultiPolygon((MultiPolygon)geom.getGeometry());
! System.out.println("poly bounds "+poly.getBounds());
! l.addGeoPolygon(poly,false);
!
! //System.out.println("multipolygon converted");
!
! break;
! default :
! System.out.println("Unkown geom type");
! }
!
! //System.out.println(geom.toString());
!
! }
! Theme t = new Theme(l);
//f.add(new uk.ac.leeds.ccg.widgets.ToolBar(view),"South");
f.setVisible(true);
view.addTheme(t);
-
-
-
-
}
- public GeoPolygon convertMultiPolygon(MultiPolygon p){
- GeoPolygon gp=null;
- GeoPolygon part;
- int count = p.numPolygons();
-
- for(int i=0;i<count;i++){
- org.postgis.Polygon poly = p.getPolygon(i);
- int rings = poly.numRings();
- for(int j=0;j<rings;j++){
- LinearRing ring = poly.getRing(j);
- double x[] = new double[ring.points.length];
- double y[] = new double[ring.points.length];
- for(int k=0;k<x.length;k++){
- x[k] = ring.points[k].x;
- y[k] = ring.points[k].y;
- }
- part = new GeoPolygon(x,y,x.length);
- if(i==0 && j==0){
- gp = part;
- }
- else{
- gp.addSubPart(part);
- }
- }
- }
- return gp;
- }
--- 21,41 ----
/** Creates new Tester */
public PostGISTester() throws Exception {
! GeoRectangle bounds = new GeoRectangle(400000,400000,10000,10000);
! PostGISDataSource server = new PostGISDataSource();
! server.connect("feathers.leeds.ac.uk","postgis","postgis","postgis");
Frame f = new Frame();
f.setSize(500,500);
Viewer view = new Viewer();
f.add(view,"Center");
! f.add(new ToolBar(view),"South");
! //MixedLayer l = server.getFeatures(bounds);
! PostGISLayer pgl = new PostGISLayer(server,bounds);
! Theme t = new Theme(pgl);
//f.add(new uk.ac.leeds.ccg.widgets.ToolBar(view),"South");
f.setVisible(true);
view.addTheme(t);
}
|
|
From: James M. <jma...@us...> - 2001-12-04 09:24:12
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/sfsql
In directory usw-pr-cvs1:/tmp/cvs-serv6155
Added Files:
PostGISDataSource.java
Log Message:
Provides a connection to a postgis database:
MultiPolygons only at the moment.
--- NEW FILE: PostGISDataSource.java ---
/*
* PostGISDataSource.java
*
* Created on 01 December 2001, 00:15
*/
package uk.ac.leeds.ccg.sfsql;
import java.sql.*;
import org.postgis.*;
import uk.ac.leeds.ccg.geotools.*;
/**
*
* @author James Macgill
* @version
*/
public class PostGISDataSource {
Connection connection;
/** Creates new PostGISDataSource */
public PostGISDataSource() {
}
public void connect(String server,String database,String user,String passwd) throws SQLException{
try {
Class.forName("org.postgresql.Driver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("DaS->ClassNotFoundException: ");
System.err.println("DaS->"+e.getMessage());
}
connection = DriverManager.getConnection("jdbc:postgresql://"+server+"/"+database,user,passwd);
((org.postgresql.Connection)connection).addDataType("geometry","org.postgis.PGgeometry");
((org.postgresql.Connection)connection).addDataType("box3d","org.postgis.PGbox3d");
}
public MixedLayer getFeatures(GeoRectangle bounds) throws SQLException{
MixedLayer l = new MixedLayer();
addFeatures(l,bounds);
return l;
}
public void addFeatures(MixedLayer l,GeoRectangle bounds)throws SQLException{
Statement s = connection.createStatement();
//PGbox3d box3d = new PGbox3d(new org.postgis.Point(400000,400000),new org.postgis.Point(410000,410000));
StringBuffer box3d = new StringBuffer("BOX3D (");
box3d.append(bounds.x);
box3d.append(" ");
box3d.append(bounds.y);
box3d.append(",");
box3d.append(bounds.x+bounds.width);
box3d.append(" ");
box3d.append(bounds.y+bounds.height);
int notNeeded[] = l.getIDs(bounds,SelectionManager.CROSSES);
StringBuffer idList = new StringBuffer();
if(notNeeded.length>0){
idList.append("and oid not in (");
idList.append(notNeeded[0]);
for(int i=1;i<notNeeded.length;i++){
idList.append(",");
idList.append(notNeeded[i]);
}
idList.append(")");
}
System.out.println("select geo_value,oid from yh_eds where '"+box3d+"'::box3d && geo_value "+idList);
ResultSet r = s.executeQuery("select geo_value,oid from yh_eds where '"+box3d+"'::box3d && geo_value "+idList);
// ResultSet r = s.executeQuery("select geo_value,oid from yh_eds where geo_value && '"+box3d+"'::box3d AND oid not in set (8223251,8223252)");
l.setStatus(l.LOADING);
while( r.next() ) {
/*
* Retrieve the geometry as an object then cast it to the geometry type.
* Print things out.
*/
PGgeometry geom = (PGgeometry)r.getObject(1);
int id = r.getInt(2);
//System.out.println("Row " + id + ":");
if(l.getGeoShape(id)!=null)continue;
//System.out.println(geom.getGeoType());
switch (geom.getGeoType()){
case Geometry.POINT:
case Geometry.MULTIPOINT:
case Geometry.GEOMETRYCOLLECTION:
case Geometry.LINESTRING:
case Geometry.MULTILINESTRING:
System.out.println("Geometry type not supported");
break;
case Geometry.POLYGON:
System.out.println("A polygon!");
break;
case Geometry.MULTIPOLYGON:
GeoPolygon poly = convertMultiPolygon(id,(MultiPolygon)geom.getGeometry());
//System.out.println("poly bounds "+poly.getBounds());
l.addGeoPolygon(poly);
//System.out.println("multipolygon converted");
break;
default :
System.out.println("Unkown geom type");
}
//System.out.println(geom.toString());
}
l.setStatus(l.COMPLETED);
}
public GeoPolygon convertMultiPolygon(int id,MultiPolygon p){
GeoPolygon gp=null;
GeoPolygon part;
int count = p.numPolygons();
for(int i=0;i<count;i++){
org.postgis.Polygon poly = p.getPolygon(i);
int rings = poly.numRings();
for(int j=0;j<rings;j++){
LinearRing ring = poly.getRing(j);
double x[] = new double[ring.points.length];
double y[] = new double[ring.points.length];
for(int k=0;k<x.length;k++){
x[k] = ring.points[k].x;
y[k] = ring.points[k].y;
}
part = new GeoPolygon(id,x,y,x.length);
if(i==0 && j==0){
gp = part;
}
else{
gp.addSubPart(part);
}
}
}
return gp;
}
}
|
|
From: James M. <jma...@us...> - 2001-12-03 21:43:33
|
Update of /cvsroot/geotools/geotools/src/demonstrations In directory usw-pr-cvs1:/tmp/cvs-serv27234 Modified Files: ImageExample.java ImageExample.html Log Message: Moved image bounds into the param tags of the applet Index: ImageExample.java =================================================================== RCS file: /cvsroot/geotools/geotools/src/demonstrations/ImageExample.java,v retrieving revision 1.3 retrieving revision 1.4 diff -w -C2 -d -r1.3 -r1.4 *** ImageExample.java 2001/09/18 11:35:57 1.3 --- ImageExample.java 2001/12/03 21:43:29 1.4 *************** *** 4,7 **** --- 4,8 ---- import java.net.*; import java.io.*; + import java.util.StringTokenizer; import uk.ac.leeds.ccg.geotools.*; *************** *** 13,27 **** * and the image needs to be on the same server as the applet, otherwise you * will get java security problems. * * @author Cameron Shorter <a href="mailto:ca...@sh...">ca...@sh...</a> */ ! public class ImageExample extends java.applet.Applet ! { Viewer view = new Viewer(); Theme currentTheme; - GeoRectangle extent = new GeoRectangle(0,0,100,100); ImageLayer iLayer; - String imageString; - URL imageURL; public void init(){ --- 14,25 ---- * and the image needs to be on the same server as the applet, otherwise you * will get java security problems. + * JM: Not sure this is true, works fine in a browser run localy for me... * * @author Cameron Shorter <a href="mailto:ca...@sh...">ca...@sh...</a> */ ! public class ImageExample extends java.applet.Applet { Viewer view = new Viewer(); Theme currentTheme; ImageLayer iLayer; public void init(){ *************** *** 33,48 **** public void start(){ try{ ! imageString = this.getParameter("image"); ! imageURL = new URL(getCodeBase(),imageString); } catch(IOException e){ this.showStatus("Error loading file "+ imageString + "\n" + e); } - - iLayer=new ImageLayer(this.imageURL,this.extent); - this.currentTheme=new Theme(iLayer); - this.view.addTheme(this.currentTheme); - view.setMapExtent(this.extent); } --- 31,60 ---- public void start(){ + //get the name of the image to display + String imageString = this.getParameter("image"); + //and its bounds (in the form x,y,width,height) + String boundsString = this.getParameter("bounds"); + //get each part of the bounds. + StringTokenizer tok = new StringTokenizer(boundsString,","); + double x = new Double(tok.nextToken()).doubleValue(); + double y = new Double(tok.nextToken()).doubleValue(); + double w = new Double(tok.nextToken()).doubleValue(); + double h = new Double(tok.nextToken()).doubleValue(); + //construct a GeoRectangle + GeoRectangle extent = new GeoRectangle(x,y,w,h); + try{ ! //create a URL that points to the image ! URL imageURL = new URL(getCodeBase(),imageString); ! //construct an image layer from the image and the bounds ! iLayer=new ImageLayer(imageURL,extent); ! //create a theme using the image layer ! currentTheme=new Theme(iLayer); ! //add the image to the viewer. ! view.addTheme(this.currentTheme); } catch(IOException e){ this.showStatus("Error loading file "+ imageString + "\n" + e); } } Index: ImageExample.html =================================================================== RCS file: /cvsroot/geotools/geotools/src/demonstrations/ImageExample.html,v retrieving revision 1.3 retrieving revision 1.4 diff -w -C2 -d -r1.3 -r1.4 *** ImageExample.html 2001/09/10 22:33:55 1.3 --- ImageExample.html 2001/12/03 21:43:29 1.4 *************** *** 11,22 **** <H2>A basic map which uses an image to build a map layer.</H2> <P><APPLET ARCHIVE="jars/JimiCore.jar,jars/support.jar,jars/geotools.jar,jars/collections.jar" CODE="ImageExample.class" WIDTH="470" HEIGHT="170" ALIGN="BOTTOM"> ! <PARAM NAME="image" VALUE="images/logo.gif"> </APPLET> </P> - <P><<A HREF="ImageExample.java">source</A>></P> ! <P><CODE><APPLET ARCHIVE="jars/collections.jar,jars/JimiCore.jar,jars/geotools.jar" CODE="ImageExample.class" WIDTH=430 HEIGHT=270><BR> ! <PARAM NAME="image" VALUE="images/logo.jpg"><BR> </APPLET></CODE> --- 11,23 ---- <H2>A basic map which uses an image to build a map layer.</H2> <P><APPLET ARCHIVE="jars/JimiCore.jar,jars/support.jar,jars/geotools.jar,jars/collections.jar" CODE="ImageExample.class" WIDTH="470" HEIGHT="170" ALIGN="BOTTOM"> ! <PARAM NAME="image" VALUE="maps/worldview.gif"> ! <param name="bounds" value="-180,-90,360,180"> </APPLET> </P> <P><<A HREF="ImageExample.java">source</A>></P> ! <p>The applet requires two parameters, the first 'image' points to the relative location of the image to display, whils the second 'bounds' gives the spatial extent of the image.<br> <P><CODE><APPLET ARCHIVE="jars/collections.jar,jars/JimiCore.jar,jars/geotools.jar" CODE="ImageExample.class" WIDTH=430 HEIGHT=270><BR> ! <PARAM NAME="image" VALUE="maps/worldview.gif"><BR> ! <PARAM NAME="bounds" VALUE="-180,-90,360,180"><BR> </APPLET></CODE> |
|
From: James M. <jma...@us...> - 2001-12-03 15:06:33
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools
In directory usw-pr-cvs1:/tmp/cvs-serv32469/uk/ac/leeds/ccg/geotools
Modified Files:
GeoPoint.java
Log Message:
Removed automatic setting of bounds for geopoints.
These are now not created untill asked for, which for the vast majority of geopoints is never.
Index: GeoPoint.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/GeoPoint.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -w -C2 -d -r1.5 -r1.6
*** GeoPoint.java 2001/02/08 16:13:23 1.5
--- GeoPoint.java 2001/12/03 15:06:31 1.6
***************
*** 33,37 ****
this.x = x;
this.y = y;
! setBounds(new GeoRectangle(x,y,0,0));
}
--- 33,37 ----
this.x = x;
this.y = y;
! //setBounds(new GeoRectangle(x,y,0,0));
}
|
|
From: Artur H. <ko...@us...> - 2001-12-03 14:32:16
|
Update of /cvsroot/geotools/unittestsgen In directory usw-pr-cvs1:/tmp/cvs-serv23416 Removed Files: MANIFEST.MF build.xml prj.el Log Message: Removed some files added by mistake --- MANIFEST.MF DELETED --- --- build.xml DELETED --- --- prj.el DELETED --- |
|
From: Artur H. <ko...@us...> - 2001-12-03 14:32:16
|
Update of /cvsroot/geotools/unittestsgen/src/testsgen/wttools In directory usw-pr-cvs1:/tmp/cvs-serv23416/src/testsgen/wttools Removed Files: DirWalkerImpl.java LogImpl.java Log Message: Removed some files added by mistake --- DirWalkerImpl.java DELETED --- --- LogImpl.java DELETED --- |
|
From: Artur H. <ko...@us...> - 2001-12-03 14:32:15
|
Update of /cvsroot/geotools/unittestsgen/src/testsgen In directory usw-pr-cvs1:/tmp/cvs-serv23416/src/testsgen Removed Files: GenerateTests.java TestsGen.java package.html Log Message: Removed some files added by mistake --- GenerateTests.java DELETED --- --- TestsGen.java DELETED --- --- package.html DELETED --- |
|
From: Artur H. <ko...@us...> - 2001-12-03 14:32:15
|
Update of /cvsroot/geotools/unittestsgen/src/testsgen/ifc In directory usw-pr-cvs1:/tmp/cvs-serv23416/src/testsgen/ifc Removed Files: CodeGenIfc.java DirWalkerIfc.java LogIfc.java ParsedSourceIfc.java PropertyIfc.java SrcParserIfc.java package.html Log Message: Removed some files added by mistake --- CodeGenIfc.java DELETED --- --- DirWalkerIfc.java DELETED --- --- LogIfc.java DELETED --- --- ParsedSourceIfc.java DELETED --- --- PropertyIfc.java DELETED --- --- SrcParserIfc.java DELETED --- --- package.html DELETED --- |
|
From: Ian T. <ian...@us...> - 2001-12-03 14:23:15
|
Update of /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools
In directory usw-pr-cvs1:/tmp/cvs-serv20868/uk/ac/leeds/ccg/geotools
Modified Files:
MultiLayer.java
Log Message:
added getIDs method
Index: MultiLayer.java
===================================================================
RCS file: /cvsroot/geotools/geotools/src/uk/ac/leeds/ccg/geotools/MultiLayer.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -w -C2 -d -r1.14 -r1.15
*** MultiLayer.java 2001/11/30 01:48:57 1.14
--- MultiLayer.java 2001/12/03 14:23:12 1.15
***************
*** 14,18 ****
static boolean DEBUG=false;
static String DBC="ML->";
! Vector layers = new Vector();
GeoRectangle bounds = new GeoRectangle();
--- 14,18 ----
static boolean DEBUG=false;
static String DBC="ML->";
! public Vector layers = new Vector();
GeoRectangle bounds = new GeoRectangle();
***************
*** 20,24 ****
}
public void clearLayers(boolean quite){
! layers= new Vector();
if(!quite) notifyLayerChangedListeners(LayerChangedEvent.DATA);
}
--- 20,25 ----
}
public void clearLayers(boolean quite){
! //layers= new Vector();
! layers.clear();
if(!quite) notifyLayerChangedListeners(LayerChangedEvent.DATA);
}
***************
*** 160,163 ****
--- 161,178 ----
return null;
}
+ public int[] getIDs(GeoRectangle box,int mode){
+ int [] ids=new int[0];
+ int [] tmp=new int[0];
+ for(int i=0;i<layers.size();i++){
+ int [] id=((Layer)layers.elementAt(i)).getIDs(box,mode);
+ tmp=ids;
+ ids=new int[id.length+ids.length];
+ System.arraycopy(tmp,0,ids,0,tmp.length);
+ System.arraycopy(id,0,ids,tmp.length,id.length);
+
+ }
+ return ids;
+
+ }
}
|
|
From: James M. <jma...@us...> - 2001-12-03 11:46:28
|
Update of /cvsroot/geotools/geotools/design/overview/images
In directory usw-pr-cvs1:/tmp/cvs-serv14176
Added Files:
080timeline.gif
Log Message:
image of timeline for 080
--- NEW FILE: 080timeline.gif ---
GIF89a^Æ
J´¨Ñ£H*(
r_ÿO¾¼y¨ä´jl¸O¿~r²N_tPj@¤HêÙ'à2öi!Ðx`
X/¼¡f8SàV$
>ÁÇl¢õFg¡èâ&-l4õÄcÁQ&L[ è(äßS&ÄE¤C¦PaÆ4ÁKVieB¦`@-Ò°Æø]I¦ÀeR lùÇ~/eÖb=%P1
\qO½ 騪±/¨6À¥`v¨Ð5ÿÌIêõ-W$fF$ÞÁ£)qµ®ÈÒ§'<¥$°j8
ÔdNrÅkõ6<[$<ÁIS¬A|úJ°I·bñdX,ÐT
¡F)´¤½ãª
J °'"ÏimmùÝq,fþøê9ѤPmÑ.Á+aAÁ1g"`¸^ÑÎxmFp¯àÍúò4Ñ l>¦`®8ªw
¸QJ&Qñ£Â3¯~M22ÅÜ Q± @ÛD¨
*H2A5°Ð(&È
"(´Ä zb×5D)J$29àIx-Iå ZÊJÁ"ñÄòuÏ`&£'¬ÅÆFdwxÂþ Á9ÀaÐ"¼QÉ6D4TÊ&^ñpmQÑ
â¼¢* XC&øp
ôÐÀlã®R,@A!pTC^Á¨Rm&fØD&É%)@zå»Ã/
¢Èif
Ò
R¼ [ÑKÔÌvN$(fWCLðÁ
qÁ`gH>äGÇÔ+¬Á9lx¢^0Cv
zVn$iÓ²-»- j§
``
AéTîdò
enb£5YüS°~
Üín?Z«%ÌLd0
#
äI¥¤ "g×<h8~@)ÜA=Èê Lã²THHAH
D1À1ùíÄ
i
¢K\"R9âîÁQa¤i'8Àðjk¿2å8äUbJ¦Û»ô¬øW@ÿ·<I *¬Z`&0¯p
åp§ÑÓÒÄì$pEÅ$ðjÉ´|ü'ÖÀ{-]:óa"$h½'Xkpê÷îIl¢(bðÕ
ü¥¤-zèø`2lÄÖÅSÀ"®,àN°jEJQÁG1K.ngÜ1V.^.Ã2ëD=PS$há»Mb×GQ'ã
à· ãgl6&ô'
r&AñvºÑÿç<fpt±|X/A
G&P
AW±w]1A#ß#^j¡bÐ'kOAbhRò
Ýbh¦Áb6g_+("Àb±wQó¨3g#"FH(õ² ¢²Yrt`&{/;Dh_zÕ÷b¦pg1T!ðw`2÷²ÿ¡©ÑkÀ R¨9â°4xuO¦à?ßçIM¡|ôV],TØp!p`¦ru*` @
°
Ù@,lY0Q0Ô/´0g=RAùh1ád
äó,¦
Ê
¡*¡J¡ ùX|0m1È9>áÆ&z¢':Ä(Ú¢.Ä4¢2
,ZB 8£:º£<ZGDP p
Æ1^F!©Å 1¸Ê¡u´01Q:bôSñKs´Þ
®ÁL,Y'ÿ±#2ò³
aÂörBNU3ÒAv/,Tuwkè2ÃnáhÃÃB
Ò± ÇrÈÂ;¢
£
-ÌÜÌ(Ï,ÎÑW±ÑÜlmªLÙ¯#Û,Î(ÒHÎè|±.íÿpÎÓ·3}ò,Î8ÓE±ÓÜ<À>MÔ+8ÔCQÔÙ,ÔHÍJmÍjÜÔ9ÐP]ÃR½ÎQ}Õ;!ÑèÊ\½ÍÍ`Ö91ÖÙ\Öf}³¸ìËkm-mÍp×41×Ó,©õj×(!ÓÜ,Í|M=mÍØ21ØÓ\ؽL=Í伨}ÔÖüØ}s=Íõ\Ù(±ÕÙÙmmÍýÙ$ÚÓФ}j}ÚÚ(±ÚÐÚ®M°ÝÌ=Û$Q×Ð|Û¸-ºmÛºÜÛ¹½
ÌÝàùàáÐÌ(`IáaáÍ×ÎámÍþá
âÓ<â$îC+ÍÍâ ±Þ7».þâ¬Î->ãE¶\èÜØ8ãølÍ<Þã¡ßÊlÚB®T=ÍF~ääмäLàÖ\ÛL
!"¦ÀZnö÷Ä=·8p(»£.ïA55ÈNÞ¥üÞïþþï
¿ðo¯ñ~¼:óY/àëHÙéÚSob`±ir1ª£yá½Á¿ò,ßò.ÿò0ó2ÿ?ó4_ó
åΰD¿ÂMñYù^ëE
[C?ñB/¼v9ñù
6=ãÇYv®ê6xe-î
.[ÏÒós"
¼S
@ÞñÄ]ÇLÅq$W
ãèLw eaÊ%ªÃ¯»û>?ãÏDÄáo
°ÅüáYì]þáyOáô[Øzù
JF6ùb¡6¹S7.fÖ]ÿ,pÂý
ï&¡Wc°C?äH¸'0Èd
íè,Çâ$G7ÿ4PA%
|