Dear Jody,
thanks for pointing me to my mistake, I have changed it to :
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-process</artifactId>
<version>${geotools.version}</version>
</dependency>
and it seems to work.
I have troubles to figure out how to run the code in the test - I tried
using the 2.5-snapshot, as well as the 2.6-SNAPSHOT version, and it
seems like more than the name of the class has changed:
I get offered only the Raster2VectorFactory class, instead of the one
used in the test case - RasterToVectorFactory.
I changed that, but I have no luck with filling the input parameters:
input.put(Raster2VectorFactory.RASTER.key, mycoverage);
for instance. I cannot set these field in the way used in the testcase,
but I can identify them in the process:
Map<String, Parameter<?>> r2vpinfo = (new
Raster2VectorFactory()).getParameterInfo();
Set<Entry<String, Parameter<?>>> set = r2vpinfo.entrySet();
Iterator<Entry<String, Parameter<?>>> iter = set.iterator();
while (iter.hasNext()) {
System.out.println(iter.next().toString());
}
It also seems like the approach used in the UserGuide:
features = Raster2Vector.process( gridCoverage, 2, Collections.EMPTY, null );
does not work - the method process is not offered for Raster2Vector.
I am obviously missing something. What is it? Maybe it is just my lack
of experience with factories/parameters, but so far I have used them for
coverages or shapefiles and all was good.
Thanks heaps,
Martin
Jody Garnett wrote:
> Hi martin you seem a bit confused :-)
>
> The maven dependency you described is for the "root pom" used by all
> the unsupported modules (it does not have any code associated with
> it). If you can depend on the gt-process module directly it would be
> good.
>
> For usage please review the test case code; it shows how to call the
> method pretty well:
> -
> http://svn.osgeo.org/geotools/trunk/modules/unsupported/process/src/test/java/org/geotools/process/raster/RasterToVectorProcessTest.java
>
> I also wrote something down here in the user guide:
> - http://docs.codehaus.org/display/GEOTDOC/Process+Plugin
>
> Cheers,
> Jody
>
> On Mon, Apr 27, 2009 at 8:26 PM, Martin Tomko <[email protected]> wrote:
>
>> Dear All, Martin,
>> I am interested to play with the Raster2Vector process you shared in the
>> unsupported modules, but I am having problem to check it out using maven.
>> I tried:
>> <dependency>
>> <groupId>org.geotools</groupId>
>> <artifactId>unsupported</artifactId>
>> <version>${geotools.version}</version>
>> </dependency>
>>
>> But I am getting :
>>
>> Missing:
>> ----------
>> 1) org.geotools:unsupported:jar:2.5-SNAPSHOT
>> ...
>> from the repository
>> <repository>
>> <id>geotools</id>
>> <name>Geotools repository</name>
>> <url>http://maven.geotools.fr/repository</url>
>> </repository>
>>
>> Is there a different one to use?
>>
>> Also, I would be grateful if it would be possible to share an example of
>> usage - it would save me a couple of hours of tinkering, I guess.
>>
>> I am trying to get to a MultiPolygon representation of cells of my
>> raster, following the unsuccessful serialization we discussed last week.
>> I would have to do this later on anyway.
>>
>> Cheers
>> Martin
>>
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensign option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>
>
>
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users