gvSIG feature requests #566
Allow MemoryStoreProvider to be used without geometries
Status: | Closed | % Done: | 100% | |
---|---|---|---|---|
Priority: | Urgent | Spent time: | - | |
Assignee: | Víctor Acevedo | |||
Category: | Application | |||
Target version: | 2.0.0-alpha5 | |||
gvSIG version: | 2.0.0 | Add-on resolve version: | ||
Keywords: | developer, table | Add-on resolve build: | ||
Has patch: | Yes | Proyecto: | ||
Add-on name: | Unknown | Hito: | ||
Add-on version: |
Description
This simple patch allows MemoryStoreProvider to be used when creating tables in memory. It has been tested loading data from AEMET.
The patch (read Envelope, and only uses the envelope if not null):
Index: MemoryStoreProvider.java
===================================================================
--- MemoryStoreProvider.java (revision 38091)
++ MemoryStoreProvider.java (working copy)@ -289,15 +289,18
@
featureProvider.setNew(false);
data.add(featureProvider);
oids.put(featureProvider.getOID(), featureProvider);
- if (envelope == null) {
- try {
- envelope = (Envelope) feature.getDefaultEnvelope().clone();
- } catch (CloneNotSupportedException e) {
- envelope = feature.getDefaultEnvelope();
- }
- } else {
- envelope.add(feature.getDefaultEnvelope());
- }
Envelope aux = feature.getDefaultEnvelope();
+ if (aux != null) { // There are geometries
+ if (envelope == null) {
+ try {
+ envelope = (Envelope) aux.clone();
+ } catch (CloneNotSupportedException e) {
+ envelope = feature.getDefaultEnvelope();
+ }
+ } else {
+ envelope.add(feature.getDefaultEnvelope());
+ }
+ }
}
public List getData() {
Associated revisions
Fixes #566
History
#1 Updated by Joaquín del Cerro Murciano about 12 years ago
- Assignee set to Víctor Acevedo
- Priority changed from Normal to Urgent
#2 Updated by Víctor Acevedo about 12 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r38199.
#3 Updated by Víctor Acevedo about 12 years ago
- Target version set to 2.0.0-alpha5
#4 Updated by María Maluenda almost 12 years ago
- Status changed from Fixed to Awaiting response
Need instructions in order to check the bugfix
#5 Updated by Joaquín del Cerro Murciano almost 12 years ago
- Status changed from Awaiting response to Under review
#6 Updated by Joaquín del Cerro Murciano over 11 years ago
- Status changed from Under review to Closed