Loading ...
Sorry, an error occurred while loading the content.

[sw-gis] Re: Coordinate interchange

Expand Messages
  • Sileo, Tony
    I would not recommend trying to do this operation at a low database level, even if somebody comes up with a way to do it. The reason is that you need to make
    Message 1 of 3 , Mar 12, 1999
    View Source
    • 0 Attachment
      I would not recommend trying to do this operation at a low database level,
      even if somebody comes up with a way to do it. The reason is that you need
      to make sure that the spatial indexes in your database get changed to
      reflect the swapped coordinates. I'm not exactly sure of all the impacts or
      technical details, but it seems to me like your spatial scans (including
      screen refreshes) will surely have problems after such a low level
      manipulation of the data!

      Maybe others have additional thoughts on this.

      Good luck...
      Tony Sileo
      GeoData Solutions, Inc.

      P.S. Perhaps you can instead turn your monitors on their side!? ;-)

      -----Original Message-----
      From: Alan Kornuta [mailto:Alan.Kornuta@...]
      Sent: Friday, March 12, 1999 1:53 AM
      To: sw-gis@egroups.com
      Subject: [sw-gis] Coordinate interchange

      Hi,
      I have to solve following problem. In SW 3 application all x
      coordinates
      have to be replaced by y coordinates and vice versa y
      coordinates have
      to be replaced by x coordinates. Simply all x and y coords
      have to be
      interchanged. I dont want use transform on all desired
      geometries
      (chains, points, ...), just only interchange coords on some
      low database
      level.
      Does anybody have any experience with this?

      Thanx, Alan




      ------------------------------------------------------------------------
      Internet FileZone: Always FREE!
      Instantly store & access your valuable PC files on the net,
      from any Web browser.
      SIGN UP NOW - http://offers.egroups.com/click/235/0

      eGroup home: http://www.eGroups.com/list/sw-gis
      Free Web-based e-mail groups by eGroups.com


      ------------------------------------------------------------------------
      eGroup home: http://www.eGroups.com/list/sw-gis
      Free Web-based e-mail groups by eGroups.com
    • Donald D'Mello
      Alan, Here is the method to do the swapping of coordinates for the chain type of object. Ensure to put the proper collection and geometry field name. Let me
      Message 2 of 3 , Mar 15, 1999
      View Source
      • 0 Attachment
        Alan,
        Here is the method to do the swapping of coordinates for the chain type of
        object. Ensure to put the proper collection and geometry field name. Let me
        know if it works.

        _method object_name_swap()
        v << gis_program_manager.databases[:gis]
        collection << v.collections[:object_name]

        _for an_rec _over collection.fast_elements()
        _loop
        node_rope << rope.new()
        _for coor _over
        an_rec.geometry_field_name.sectors[1].fast_elements()
        _loop
        new_x << coor.y
        new_y << coor.x
        new_coord << coordinate.new(new_x,new_y)
        node_rope.add_last(new_coord)
        _endloop

        a_sector << sector.new_with( _scatter node_rope )
        sec_r << sector_rope.new_with(a_sector)
        an_rec.unset_geometry( :geometry_field_name, _true, _false)
        an_rec.make_geometry( :geometry_field_name, sec_r)
        _endloop

        _endmethod


        Good luck.

        Cheers
        Donald




        At 09:53 AM 3/12/99 +0100, you wrote:
        >Hi,
        >I have to solve following problem. In SW 3 application all x coordinates
        >have to be replaced by y coordinates and vice versa y coordinates have
        >to be replaced by x coordinates. Simply all x and y coords have to be
        >interchanged. I dont want use transform on all desired geometries
        >(chains, points, ...), just only interchange coords on some low database
        >level.
        >Does anybody have any experience with this?
        >
        >Thanx, Alan
        >
        >
        >
        >------------------------------------------------------------------------
        >Internet FileZone: Always FREE!
        >Instantly store & access your valuable PC files on the net,
        >from any Web browser.
        >SIGN UP NOW - http://offers.egroups.com/click/235/0
        >
        >eGroup home: http://www.eGroups.com/list/sw-gis
        >Free Web-based e-mail groups by eGroups.com
        >
        >


        ------------------------------------------------------------------------
        eGroup home: http://www.eGroups.com/list/sw-gis
        Free Web-based e-mail groups by eGroups.com
      Your message has been successfully submitted and would be delivered to recipients shortly.