[Gvsig_english] gvsig and postgis / polygon creation
Johannes Sommer
johann.online at gmx.de
Thu Jan 10 09:22:37 CET 2008
Hi Francisco!
Thank you for your explanations. Now I undestand how gvsig works with
postgis.
greetings,
Johannes Sommer
> Hi.
>
> 1.- I suppose it can be revised, because other people found this way a
> bit tricky.
>
> 2.- gvSIG try to save as MULTIPOLYGON, if you close de polyline.
> Maybe, the problem is still the same, your table doesn't allow
> Multipolygons, just Polygons. In my opinion (I remark is my opinion,
> someone can think other way ;-) ), POLYGON tables aren't useful
> because you cannot draw "donuts" or Islands that belong to a province,
> for example.
> Anyway, is the same behavior that you can find en shp2pgsql utility.
> This utility will create a table of multipolygons if your shape
> contains polygons.
>
> Thanks for the suggestions.
>
> Fran.
>
> PS: To clarify a bit more, this part of code is used to decide wich
> geotype to use:
>
> case POINT2D:
> aux = "POINT";
> break;
> case LINE2D:
> aux = "MULTILINESTRING";
> break;
> case POLYGON2D:
> aux = "MULTIPOLYGON";
> break;
> case MULTI2D:
> aux = "GEOMETRY";
> break;
>
> We don't use LINESTRING or POLYGON because sometimes the geometries come
>> from shape files, and we don't know (a priori) if some of them will be
> POLYGON or MULTIPOLYGON. (Same with LINESTRING or MULTILINESTRING).
>
>
> Johannes Sommer escribió:
>> Hi again!
>> Sorry for my late reply and thanks for the suggestions.
>>
>> Francisco José Peñarrubia schrieb:
>>> Hi.
>>>
>>> 1.- Please, use MULTIPOLYGON or GEOMETRY as geotype.
>> So when I'm using gvsig and postgis I have to change my geotype
>> constraints to the common "GEOMETRY"? And what about "MULTIPOLYGON"?
>> I think these geotype constraints are important due to data integrity.
>> Is this a workaround at the moment and will gvsig support more
>> postgis-geotypes in the future?
>>
>>> 2.- Use polyline and right click when you want to close your polygon.
>>>
>>> Hope this helps.
>> Yes I noticed this before - but it raised the same exception because
>> obviously gvsig tries to save this "polygon" as polyline.
>>
>> greetings,
>> Johannes Sommer
>>
>>> Johannes Sommer escribió:
>>>> Hi all,
>>>>
>>>> I have a problem editing a postgis table. Everytime I try to save
>>>> the edits gvsig throws an psql exception:
>>>>
>>>> 'com.iver.cit.gvsig.fmap.edition.Edition.Exception:
>>>> org.postgresql.util.PSQLException: ERROR: new row for relation
>>>> "flaechen" violates check constraint "enforce_geotype_f_geometry"'
>>>>
>>>> The geotype in the postgis table is 'POLYGON'. In gvsig I created a
>>>> simple Polygon.
>>>> Other Dataviewers/-editors are able to modifiy the postgis table.
>>>>
>>>> I have another question: Is there a possibility to create a polygon
>>>> in gvsig without defining the central point? Because in my opinion
>>>> this kind of polygon creation is uncomfortable - especially for
>>>> unexperienced users. I'm thinking about creating a polygon like a
>>>> polyline in gvsig.
>>>>
>>>> Thanks for your comments.
>>>>
>>>> greetings,
>>>> Johannes
>>>>
>>>> _______________________________________________
>>>> Gvsig_internacional mailing list
>>>> Gvsig_internacional at runas.cap.gva.es
>>>> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>>>
>>> _______________________________________________
>>> Gvsig_internacional mailing list
>>> Gvsig_internacional at runas.cap.gva.es
>>> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>>>
>>
>> _______________________________________________
>> Gvsig_internacional mailing list
>> Gvsig_internacional at runas.cap.gva.es
>> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at runas.cap.gva.es
> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>
More information about the Gvsig_internacional
mailing list