Haha, i like the word POJO...
Concerning the unioning. I won't be able to set up another version of GeoServer because my thesis is due in a couple of weeks and it would be a nice plus if there would be unions. But I might try later. What do think about this work around:
I want to union features that apply to a certain filter. I create that filter in Geotools and make a GetFeature request using the filter. Then I union the geometries of the features and set the 'union geometry' for the feature that is the basis for the union. Then I make an update for that feature and delete the other ones:
//get features
FeatureCollection = FeatureStore(typeName).getFeatures(filter);
//base feature
Feature unionFeature = FeatureCollection.features.next();
Geometry unionGeom = unionFeature.getDefaultGeometry();
//union geometries
while (FeatureCollection.features.hasNext()){
unionGeom.union(FeatureCollection.features.next().getDefaultGeometry();
}
unionFeature.setDefaultGeometry(unionGeom);
//transaction
FeatureStore.setTransaction(t);
//insert new feature
FeatureStore.addFeatures(unionFeature);
//delete others
FeatureStore.removeFeatures(filter);
t.commit();
Is this rubbish or would it work like a real union? Am I right that the non-spatial attributes are always the ones from the feature that is the basis of the union?
Sorry if this is maybe hard to understand. Not easy to express that in english...
Thank you for checking!
Regards, Lena
Justin Deoliveira <jdeolive@anonymised.com> schrieb am 15.01.06 20:49:28:
Hi Lena,
This is a good question, and the answer is you cant really, yet. However
the work to be able to do this has been going on a geoserver branch.
Check out http://docs.codehaus.org/display/GEOS/Experimental (Complex
Data Store).Merging this work into geotools / geoserver is going to be the priority
of the geoserver 1.4.x stream of development.-Justin
Lena Pahl wrote:
> Yeah, you're right - it's not that large. I'll try to track down the problem. Though it seemed to me that
> the size of the geometry is an issue. Maybe it's in Geotools. I'll email as soon as I find out.
> Can I ask another question? How do I union - let's say 2 features - using GeoServer? How does that work in
> Geotools?
> Thanks!
> Lena
>
>
> Justin Deoliveira <jdeolive@anonymised.com> schrieb am 12.01.06 20:03:32:
>
>>Hi Lena,
>>
>>170 coordinates isn't that large, shouldn't be a resource problem at
>>all. Something else must be going wrong.
>>
>>-Justin
>>
>>Lena Pahl wrote:
>>
>>>Hi Justin!
>>>I encoutered problems with a polygon of 170 coordinates. I didn't have any trouble dealing with a feature polygon of 70 nodes.
>>>
>>>
>>>Justin Deoliveira <jdeolive@anonymised.com> schrieb am 11.01.06 19:43:14:
>>>
>>>
>>>>I would think the only limit is memory, it could be that your polygon
>>>>has so many coordinates that you are running out of memory. Do you have
>>>>any idea of how many coordinates your polygon has?
>>>>
>>>>Lena Pahl wrote:
>>>>
>>>>
>>>>>Hello!
>>>>>I don't know if my problem is related to GeoServer or Geotools so I'm posting this to both lists...
>>>>>Is there a known limitation to the number of nodes/points that a multipolygon can have? I was wondering - because sometimes when I insert features with large geometries into ArcSDE using GeoServer those features cannot be deleted anymore. Querying works fine though..
>>>>>Did anybody have that experience? How many points can a multipolygon/polygon have anyways?
>>>>>Any help is highly apreciated... Thanks!
>>>>>Regards,
>>>>>Lena
>>>>>______________________________________________________________
>>>>>Verschicken Sie romantische, coole und witzige Bilder per SMS!
>>>>>Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>>>>>
>>>>>
>>>>>
>>>>>-------------------------------------------------------
>>>>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>>>>>for problems? Stop! Download the new AJAX search engine that makes
>>>>>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>>>>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>>>>>_______________________________________________
>>>>>Geoserver-users mailing list
>>>>>Geoserver-users@lists.sourceforge.net
>>>>>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>>
>>>>
>>>>
>>>>--
>>>>Justin Deoliveira
>>>>The Open Planning Project
>>>>http://topp.openplans.org
>>>>
>>>>
>>>>-------------------------------------------------------
>>>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>>>>for problems? Stop! Download the new AJAX search engine that makes
>>>>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>>>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>>>>_______________________________________________
>>>>Geoserver-users mailing list
>>>>Geoserver-users@lists.sourceforge.net
>>>>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>>
>>>
>>>______________________________________________________________
>>>Verschicken Sie romantische, coole und witzige Bilder per SMS!
>>>Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>>>
>>>
>>
>>
>>--
>>Justin Deoliveira
>>The Open Planning Project
>>http://topp.openplans.org
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>>for problems? Stop! Download the new AJAX search engine that makes
>>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>>_______________________________________________
>>Geotools-gt2-users mailing list
>>Geotools-gt2-users@lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
> ______________________________________________________________________
> XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
> Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193