[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] working with gml
|
Thanks for your help. I was able to get the geometry and copy the kwt or gml. Now I have to figure out how to do the reverse: from a text field (wkt or gml) show a geometry on a map. I guess I'll need to create a shape or something and put it on a new layer?
Jaime
On Tue, Feb 8, 2011 at 11:20 PM, Jody Garnett
<jody.garnett@xxxxxxxxx> wrote:
WKT is a suitable format; at one point you could "copy" a geometry to the clipboard; and "paste" it into your text document as WKT.
There is a preference page setting with respect to that.
Jody
On 08/02/2011, at 7:46 PM, Jaime Lop wrote:
When I have a geometry selected I only have the "Make Hole" and "Count" operations.
It's a good idea to use the workbench selection tutorial as an starting point. In fact I don't think I really need to get the gml, any format would be good for me.
Let's say I have a MultiPolygon. Is it WKT format the one I get from the toString method? I guess there is a better way to retrieve this than the method toString (??).
Jaime
On Tue, Feb 8, 2011 at 9:48 AM, Jody Garnett
<jody.garnett@xxxxxxxxx> wrote:
Thinking.
For a geometry operation to work you may need to select the geometry with the edit tool.
You could also try an operation of a feature; or a feature collection.
Hey wait - you tried out the workbench selection tutorial. You can use that to sort out what is selected with the different tools and make your operation against that.
If that does not work we probably have a bug to look into :-P
Jody
On 08/02/2011, at 6:15 PM, Jaime Lop wrote:
Thanks for the quick response.
I've done the workbench and the distance tool tutorials and I think I have a good understanding now of how it works. However I cannot make the operation works.
I crearte my extension like this:
<extension
point="net.refractions.udig.ui.operation">
<operation
categoryId="net.refractions.udig.project.ui.informationOperations"
class="com.example.GetGML"
enablesFor="1"
id="com.example.getGML"
name="GetGML"
targetClass="org.opengis.geometry.Geometry">
<enablement></enablement>
</operation>
</extension>
Is org.opengis.geometry.Geometry the good targetClass? Should I see an entry in the contextual map menu or in the main menu?
I'm using AIXM 5.1 which extends gml 3.2 but I was trying to do it first with an example gml file (xml+xsd).
Jaime
On Mon, Feb 7, 2011 at 2:03 PM, Jody Garnett
<jody.garnett@xxxxxxxxx> wrote:
Nice.
An operation will let you work on a Geometry (ie right click when the geometry is selected). You need to set the target class to Geometry...
- http://udig.refractions.net/confluence/display/DEV/5+Operations
- http://udig.refractions.net/confluence/display/DEV/Layer+Summary+Operation
>From there the GeoTools class "GML" will help you package it up.
- http://docs.codehaus.org/display/GEOTDOC/13+XML
There is however a problem; someone is lying to you (see the above page for details). GML is not a format that you can write out. You need to make your own schema; that extends GML ideas. Think of GML as abstract classes, or bits of document structure, it is up to you to define the shape of the file you want produced.
The way the web processing service handles it is with a small schema "envelope" that contains a single geometry.
Jody
On 07/02/2011, at 10:55 PM, Jaime Lop wrote:
> Hi all,
>
> I'm new to udIg. I'm trying to do a custom development but I don't know where to start.
>
> I want to make a tool that, based on a geometry selected from the map, converts it to gml 3.2 format.
>
> Where to begin? How do I retrieve the geometry from a selection? How can I open a gml 3.2 file with udig?
>
> Thanks,
> Jaime
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel