Make multipolygon borders less detailed?

7 messages Options
Embed this post
Permalink
Jan Henrik Øverland

Make multipolygon borders less detailed?

Reply Threaded More More options
Print post
Permalink
Hi list,

I have a multipolygon shapefile that is so detailed/big that when I try to load it into my web based GIS application my web browser crashes (even Chrome does).

Thus, I wonder if there is a function in uDig that makes polygon borders less detailed - without losing their shape totally of course?

Jan

_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Gabriel Roldan

Re: Make multipolygon borders less detailed?

Reply Threaded More More options
Print post
Permalink
Hi Jan,

I may be wrong but I guess udig does not have a "generalize" or
"simplify" spatial operation right now.

If you're using geoserver though, it may be worth giving a try to the
"feature pregeneralized" datastore, which decorates any other kind of
data store allowing the creation of a pyramid like geometry structure
(using different geometry fields at different simplification levels):
<http://docs.codehaus.org/display/GEOTDOC/Feature-Pregeneralized>
<http://docs.geoserver.org/1.7.5/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html>

cheers,
Gabriel

Jan Henrik Øverland wrote:

> Hi list,
>
> I have a multipolygon shapefile that is so detailed/big that when I try
> to load it into my web based GIS application my web browser crashes
> (even Chrome does).
>
> Thus, I wonder if there is a function in uDig that makes polygon borders
> less detailed - without losing their shape totally of course?
>
> Jan
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> udig-users mailing list
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/udig-users


--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.
_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Jan Henrik Øverland

Re: Make multipolygon borders less detailed?

Reply Threaded More More options
Print post
Permalink
This is probably exactly what I need, thanks. Unfortunately I get an error message during the "getting started" instructions. I have downloaded gt-feature-pregeneralized-2.5-SNAPSHOT.jar and feature-pregeneralized-1.7.5.jar and put them into WEB-INF/lib. When I run the java command I get the following:

Exception in thread "main" java.lang.NoClassDefFoundError: org/geotools/data/FileDataStoreFactorySpi
Caused by: java.lang.ClassNotFoundException: org.geotools.data.FileDataStoreFactorySpi
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.geotools.data.gen.tool.Toolbox. Program will exit.

Jan


On Tue, Sep 1, 2009 at 10:10 PM, Gabriel Roldan <[hidden email]> wrote:
Hi Jan,

I may be wrong but I guess udig does not have a "generalize" or "simplify" spatial operation right now.

If you're using geoserver though, it may be worth giving a try to the "feature pregeneralized" datastore, which decorates any other kind of data store allowing the creation of a pyramid like geometry structure (using different geometry fields at different simplification levels):
<http://docs.codehaus.org/display/GEOTDOC/Feature-Pregeneralized>
<http://docs.geoserver.org/1.7.5/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html>

cheers,
Gabriel

Jan Henrik Øverland wrote:
Hi list,

I have a multipolygon shapefile that is so detailed/big that when I try to load it into my web based GIS application my web browser crashes (even Chrome does).

Thus, I wonder if there is a function in uDig that makes polygon borders less detailed - without losing their shape totally of course?

Jan


------------------------------------------------------------------------

_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users


--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.


_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Jan Henrik Øverland

Re: Make multipolygon borders less detailed?

Reply Threaded More More options
Print post
Permalink
Seems to be some manifest telling where to look for the main class missing, right? What to do?

I'm running the web archive version 1.7.5.


On Wed, Sep 2, 2009 at 1:24 AM, Jan Henrik Øverland <[hidden email]> wrote:
This is probably exactly what I need, thanks. Unfortunately I get an error message during the "getting started" instructions. I have downloaded gt-feature-pregeneralized-2.5-SNAPSHOT.jar and feature-pregeneralized-1.7.5.jar and put them into WEB-INF/lib. When I run the java command I get the following:

Exception in thread "main" java.lang.NoClassDefFoundError: org/geotools/data/FileDataStoreFactorySpi
Caused by: java.lang.ClassNotFoundException: org.geotools.data.FileDataStoreFactorySpi
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.geotools.data.gen.tool.Toolbox. Program will exit.

Jan



On Tue, Sep 1, 2009 at 10:10 PM, Gabriel Roldan <[hidden email]> wrote:
Hi Jan,

I may be wrong but I guess udig does not have a "generalize" or "simplify" spatial operation right now.

If you're using geoserver though, it may be worth giving a try to the "feature pregeneralized" datastore, which decorates any other kind of data store allowing the creation of a pyramid like geometry structure (using different geometry fields at different simplification levels):
<http://docs.codehaus.org/display/GEOTDOC/Feature-Pregeneralized>
<http://docs.geoserver.org/1.7.5/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html>

cheers,
Gabriel

Jan Henrik Øverland wrote:
Hi list,

I have a multipolygon shapefile that is so detailed/big that when I try to load it into my web based GIS application my web browser crashes (even Chrome does).

Thus, I wonder if there is a function in uDig that makes polygon borders less detailed - without losing their shape totally of course?

Jan


------------------------------------------------------------------------

_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users


--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.



_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Jan Henrik Øverland

Re: Make multipolygon borders less detailed?

Reply Threaded More More options
Print post
Permalink
Hi Andrea,

I can see that the manifest file is built by you:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: aaime
Build-Jdk: 1.5.0_18
Main-Class: org.geotools.data.gen.tool.Toolbox
Class-Path: geoapi-2.2.0.jar jsr-275-1.0-beta-2.jar gt-api-2.5-SNAPSHO
 T.jar jts-1.9.jar vecmath-1.3.1.jar gt-metadata-2.5-SNAPSHOT.jar gt-m
 ain-2.5-SNAPSHOT.jar jdom-1.0.jar commons-beanutils-1.7.0.jar commons
 -logging-1.1.1.jar gt-data-2.5-SNAPSHOT.jar gt-shapefile-2.5-SNAPSHOT
 .jar velocity-1.4.jar velocity-dep-1.4.jar

When I do this in a cmd shell:

cd <GEOSERVER_DATA_DIR>/data/test/0

java -jar <GEOSERVER_INSTALLATION>/WEB-INF/lib/gt-feature-pregeneralized-2.5.SNAPSHOT.jar generalize test.shp . 5,10,20,50

..I get the error message in the previous mail. Do you know why? The Main-Class is clearly defined.

Jan




On Wed, Sep 2, 2009 at 1:31 AM, Jan Henrik Øverland <[hidden email]> wrote:
Seems to be some manifest telling where to look for the main class missing, right? What to do?

I'm running the web archive version 1.7.5.



On Wed, Sep 2, 2009 at 1:24 AM, Jan Henrik Øverland <[hidden email]> wrote:
This is probably exactly what I need, thanks. Unfortunately I get an error message during the "getting started" instructions. I have downloaded gt-feature-pregeneralized-2.5-SNAPSHOT.jar and feature-pregeneralized-1.7.5.jar and put them into WEB-INF/lib. When I run the java command I get the following:

Exception in thread "main" java.lang.NoClassDefFoundError: org/geotools/data/FileDataStoreFactorySpi
Caused by: java.lang.ClassNotFoundException: org.geotools.data.FileDataStoreFactorySpi
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.geotools.data.gen.tool.Toolbox. Program will exit.

Jan



On Tue, Sep 1, 2009 at 10:10 PM, Gabriel Roldan <[hidden email]> wrote:
Hi Jan,

I may be wrong but I guess udig does not have a "generalize" or "simplify" spatial operation right now.

If you're using geoserver though, it may be worth giving a try to the "feature pregeneralized" datastore, which decorates any other kind of data store allowing the creation of a pyramid like geometry structure (using different geometry fields at different simplification levels):
<http://docs.codehaus.org/display/GEOTDOC/Feature-Pregeneralized>
<http://docs.geoserver.org/1.7.5/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html>

cheers,
Gabriel

Jan Henrik Øverland wrote:
Hi list,

I have a multipolygon shapefile that is so detailed/big that when I try to load it into my web based GIS application my web browser crashes (even Chrome does).

Thus, I wonder if there is a function in uDig that makes polygon borders less detailed - without losing their shape totally of course?

Jan


------------------------------------------------------------------------

_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users


--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.




_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Jan Henrik Øverland

Re: Make multipolygon borders less detailed?

Reply Threaded More More options
Print post
Permalink
I used Geoserver 1.7.5 and http://downloads.sourceforge.net/geoserver/geoserver-1.7.5-feature-pregeneralized-plugin.zip.

I tried Geoserver 1.7.6 and http://downloads.sourceforge.net/geoserver/geoserver-1.7.6-feature-pregeneralized-plugin.zip and it works.

Jan



On Wed, Sep 2, 2009 at 1:25 PM, Andrea Aime <[hidden email]> wrote:
Jan Henrik Øverland ha scritto:

Hi Andrea,

I can see that the manifest file is built by you:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: aaime
Build-Jdk: 1.5.0_18
Main-Class: org.geotools.data.gen.tool.Toolbox
Class-Path: geoapi-2.2.0.jar jsr-275-1.0-beta-2.jar gt-api-2.5-SNAPSHO
 T.jar jts-1.9.jar vecmath-1.3.1.jar gt-metadata-2.5-SNAPSHOT.jar gt-m
 ain-2.5-SNAPSHOT.jar jdom-1.0.jar commons-beanutils-1.7.0.jar commons
 -logging-1.1.1.jar gt-data-2.5-SNAPSHOT.jar gt-shapefile-2.5-SNAPSHOT
 .jar velocity-1.4.jar velocity-dep-1.4.jar

When I do this in a cmd shell:

cd <GEOSERVER_DATA_DIR>/data/test/0



java -jar <GEOSERVER_INSTALLATION>/WEB-INF/lib/gt-feature-pregeneralized-2.5.SNAPSHOT.jar generalize test.shp . 5,10,20,50


..I get the error message in the previous mail. Do you know why? The Main-Class is clearly defined.

I don't know how my name ended up there but I'm not the
maintainer of the features-pregeneralized module,
Christian Mueller is, but he does not deal with uDig at
all. If you ask on GeoServer-users he should answer you

Cheers
Andrea

--
Andrea Aime

OpenGeo - http://opengeo.org
Expert service straight from the developers.


_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users
Jody Garnett-2

Re: Make multipolygon borders less detailed?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Gabriel Roldan
You should be able to use the "reshape" operation to simplify a
geometry and produce a new shapefile. I don't have the function list
right now because the uDig wiki is down.

Jody

On Wed, Sep 2, 2009 at 1:10 AM, Gabriel Roldan<[hidden email]> wrote:

> Hi Jan,
>
> I may be wrong but I guess udig does not have a "generalize" or "simplify"
> spatial operation right now.
>
> If you're using geoserver though, it may be worth giving a try to the
> "feature pregeneralized" datastore, which decorates any other kind of data
> store allowing the creation of a pyramid like geometry structure (using
> different geometry fields at different simplification levels):
> <http://docs.codehaus.org/display/GEOTDOC/Feature-Pregeneralized>
> <http://docs.geoserver.org/1.7.5/user/tutorials/feature-pregeneralized/feature-pregeneralized_tutorial.html>
>
> cheers,
> Gabriel
>
> Jan Henrik Øverland wrote:
>>
>> Hi list,
>>
>> I have a multipolygon shapefile that is so detailed/big that when I try to
>> load it into my web based GIS application my web browser crashes (even
>> Chrome does).
>>
>> Thus, I wonder if there is a function in uDig that makes polygon borders
>> less detailed - without losing their shape totally of course?
>>
>> Jan
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> udig-users mailing list
>> [hidden email]
>> http://lists.refractions.net/mailman/listinfo/udig-users
>
>
> --
> Gabriel Roldan
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> udig-users mailing list
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/udig-users
>
_______________________________________________
udig-users mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/udig-users