Great Work Fran!!

I'm testing it too, and i found that when you export the "gpx layer"
to shp some fields (time and url) have 0 width, so you can't use it.

To solve it i override the method getFieldWidth in GPXVectorialDriver

@Override
        public int getFieldWidth(int i){
            return fields[i].getFieldLength();
        }

It seems to work.

Also i have to change the build.xml to compile the project. The lib
jaxen.jar that you provide with the source don't seem to be needed but
you need to create a jgpx.jar from the source code. Also i remove in
the build.xml the lines refered to images folder as we don't need it.

Also consider distribute the source code as a java project to be more
easy to use. I attach my .classpath .project files.

I will pm you with the gpx i'm using.


@Agustín, can you send your gpx file. Send a private mail if you want.

--
Francisco Puga
Grupo de Desarrollo
Cartolab - Laboratorio de Ingeniería Cartográfica.
http://www.cartolab.es

ETS Ingeniería de Caminos, Canales y Puertos
Universidade da Coruña
Campus de Elviña - 15071 A Coruña (España)
(34)981167000 ext. 5493
<project name="extGPX" default="generate-without-source" basedir=".">
    <description>
    	Tools to read GPX files.
    </description>
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="build" location="bin"/>
  <property name="dist"  location="dist"/>
  <property name="mainplugin" value="com.iver.cit.gvsig"/>
  <property name="plugin" value="org.gvsig.gpx"/>
  <property name="divbyzero" value="jgpx" />
  <property name="andami" location="../_fwAndami" />
	<property name="extensionsDir" location="../_fwAndami/gvSIG/extensiones"/>
	<property name="lib-dir" location="${extensionsDir}/${mainplugin}/lib"/>

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
    <mkdir dir="${dist}"/>

  </target>

  <target name="generate-without-source"
  		description="generate the distribution without the source file">
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}"/>
  	<mkdir dir="${dist}/lib"/>

    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
	<copy todir="${dist}/lib">
  	    	<fileset dir="lib" includes="*"/>
  	</copy>  	

  	<jar jarfile="${dist}/lib/${plugin}.jar" basedir="${build}" includes="org/gvsig/**"
    />
  	
  	<jar jarfile="${dist}/lib/${divbyzero}.jar" basedir="${build}" includes="net/divbyzero/**" />
  	
  	<copy file="config/config.xml" todir="${dist}"/>
    <copy todir="${dist}">
    	<fileset dir="config" includes="text*.properties"/>
    </copy>
    <move todir="${extensionsDir}/${plugin}/">
    	<fileset dir="${dist}" includes="**/**"/>
    </move>
  </target>


	<target name="compile" description="compile the source" >
		<!-- Compile the Java code from ${src} to ${build} -->
		<mkdir dir="${build}" />
		<echo>${compile-classpath}</echo>
		<javac  srcdir="${src}"
			destdir="${build}"
			debug="${debug}"
			debuglevel="${debuglevel}"
			classpath="${compile-classpath}"/>
	</target>

	<target name="copy-data-files">
	    <copy file="config/config.xml" todir="${dist}"/>
		<copy todir="${dist}">
			<fileset dir="config" includes="text*.properties"/>
		</copy>
	</target>

	<target name="move-to-andami">
	   <move todir="${extensionsDir}/${plugin}/">
	    	<fileset dir="${dist}" includes="**/**"/>
	    </move>
	</target>


	<target name="clean"
	        description="clean up" >
	    <!-- Delete the ${build} and ${dist} directory trees -->
		<delete dir="${dist}"/>
		<delete dir="${build}"/>
	</target>
</project>

Attachment: .project
Description: Binary data

Attachment: .classpath
Description: Binary data

_______________________________________________
Gvsig_internacional mailing list
[email protected]
http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional

Reply via email to