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

RE: [cc2-dev-l] matching coordinates with zone

Expand Messages
  • bac@world.std.com
    The XP Toolkit that comes with CC2 (check your Notes Developers subdirectory) provides the tools and documentation to write C or C++ code to interact with
    Message 1 of 8 , Feb 19, 2002
      The XP Toolkit that comes with CC2 (check your "Notes\Developers" subdirectory) provides the tools and documentation to write C or C++ code to interact with CC2.  To work with VB you either have to encapsulate the CC2 work in a C/C++ DLL (or COM object) and call that from VB, or potentially use the "Intercom" routines.  I don't know much about them but they provide a mechanism for talking to CC2 through a disk file...You can read more about it in the same directory mentioned above.
       
      Welcome to the CC2 Developers Group!
       
      Bruce
       
      -----------------------------------------------------------------------------------------------
      Let me mention first that I tried signed up for this list on ProFantasy's
      site, but it signed me up for the cc2-l list instead. I tried it again and
      watched more carefully in case I had clicked on the wrong link, but indeed
      the page said it was for the dev list yet I got another confimation for the
      regular list.

      Anyway... I'm working in VB6. What I'd like to do is set up various zones on
      my map (reflected by adjacent smooth polygons) and somehow query the map
      through VB to see if a given set of coordinates is within the boundaries of
      a given zone (i.e. inside a given polygon). Anyone have thoughts on how I
      could do this? Any existing dll's which would provide this functionality?

      My bottom line is to use this method to pass in some coordinates and see
      what kind of terrain/vegetation those coordinates represent. Perhaps I'm
      thinking down the wrong avenue and there's an easier way than my zones idea.

      -----------------------------------------------------------------------------------------------

      Bruce A. Carson
      Director of Technology
      Edgewater Technology
      bcarson@...

       
    • L. Lee Saunders
      Hi, ... Sorry to here about your troubles. I do believe that Linda is on this list though, so she will probably look into it. ... There are many ways to
      Message 2 of 8 , Feb 19, 2002
        Hi,

        >Let me mention first that I tried signed up for this list on ProFantasy's
        >site, but it signed me up for the cc2-l list instead. I tried it again and
        >watched more carefully in case I had clicked on the wrong link, but indeed
        >the page said it was for the dev list yet I got another confimation for the
        >regular list.

        Sorry to here about your troubles. I do believe that Linda is on this list
        though, so she will probably look into it.

        >Anyway... I'm working in VB6. What I'd like to do is set up various zones
        >on
        >my map (reflected by adjacent smooth polygons) and somehow query the map
        >through VB to see if a given set of coordinates is within the boundaries of
        >a given zone (i.e. inside a given polygon). Anyone have thoughts on how I
        >could do this? Any existing dll's which would provide this functionality?

        There are many ways to automate CC2. The toughest, but in my own opinion
        the most fulfilling, is to directly connect CC2 to an VB ActiveX Dll. To do
        this you'll need to do some C/C++ programming as well.

        If you do not own Visual C++ 6.0 then you either need to get a friend to
        write the glue routines for you or you will be limited to using 'Intercom'

        Intercom interfaces external programs with CC2 macros. This is not as
        limiting as you would think. In fact the external program can write all but
        the first and last lines of the macro it is calling, so you have lots of
        power. It just will not feel 100% like a true part of CC2.

        >My bottom line is to use this method to pass in some coordinates and see
        >what kind of terrain/vegetation those coordinates represent. Perhaps I'm
        >thinking down the wrong avenue and there's an easier way than my zones
        >idea.
        >
        >Thanks

        Yes, this is doable. It just depends how you want to go about it. Do you
        want to submit a long list of coordinates one at a time and recieve the
        output one at a time or are you looking at a batch process? Or, do you want
        the user to click on a point and have the software report the coordinates to
        your software?

        Like I said, its doable, but first you need to nail down exactly what you
        want. Then we can further help you.

        Lee

        _________________________________________________________________
        MSN Photos is the easiest way to share and print your photos:
        http://photos.msn.com/support/worldwide.aspx
      • raorgen
        ... opinion ... Dll. To do ... friend to ... using Intercom ... as ... write all but ... lots of ... I do own Visual C++ 6, but my C skills are very crude.
        Message 3 of 8 , Feb 19, 2002
          >
          > There are many ways to automate CC2. The toughest, but in my own
          opinion
          > the most fulfilling, is to directly connect CC2 to an VB ActiveX
          Dll. To do
          > this you'll need to do some C/C++ programming as well.
          >
          > If you do not own Visual C++ 6.0 then you either need to get a
          friend to
          > write the glue routines for you or you will be limited to
          using 'Intercom'
          >
          > Intercom interfaces external programs with CC2 macros. This is not
          as
          > limiting as you would think. In fact the external program can
          write all but
          > the first and last lines of the macro it is calling, so you have
          lots of
          > power. It just will not feel 100% like a true part of CC2.
          >

          I do own Visual C++ 6, but my C skills are very crude. I certainly
          wouldn't be able to make a dll.


          >
          > Yes, this is doable. It just depends how you want to go about it.
          Do you
          > want to submit a long list of coordinates one at a time and recieve
          the
          > output one at a time or are you looking at a batch process? Or, do
          you want
          > the user to click on a point and have the software report the
          coordinates to
          > your software?
          >
          > Like I said, its doable, but first you need to nail down exactly
          what you
          > want. Then we can further help you.
          >
          > Lee
          >

          I want to submit a coordinate one at a time and deduce what terrain
          that coordinate lies within. So I submit (2345.67,6789.02) and it
          looks at my map and says that's in a forest. The coordinate
          submissions will occur one at a time. The user will not actually be
          interacting with the map visually, just receiving information about
          the environment of the coordinates. I figured that I would need to
          divide the world into discreet polygons representing the terrain
          zones so it would have something specific to compare to.


          Thanks,
          Ed
        • jdobritt
          What about basing the terrain type on the sorts of symbols used in a specific area? Anna ... not ... it. ... recieve ... do
          Message 4 of 8 , Feb 19, 2002
            What about basing the terrain type on the sorts of symbols used in a
            specific area?

            Anna

            --- In cc2-dev-l@y..., "raorgen" <raorgen@h...> wrote:
            >
            > >
            > > There are many ways to automate CC2. The toughest, but in my own
            > opinion
            > > the most fulfilling, is to directly connect CC2 to an VB ActiveX
            > Dll. To do
            > > this you'll need to do some C/C++ programming as well.
            > >
            > > If you do not own Visual C++ 6.0 then you either need to get a
            > friend to
            > > write the glue routines for you or you will be limited to
            > using 'Intercom'
            > >
            > > Intercom interfaces external programs with CC2 macros. This is
            not
            > as
            > > limiting as you would think. In fact the external program can
            > write all but
            > > the first and last lines of the macro it is calling, so you have
            > lots of
            > > power. It just will not feel 100% like a true part of CC2.
            > >
            >
            > I do own Visual C++ 6, but my C skills are very crude. I certainly
            > wouldn't be able to make a dll.
            >
            >
            > >
            > > Yes, this is doable. It just depends how you want to go about
            it.
            > Do you
            > > want to submit a long list of coordinates one at a time and
            recieve
            > the
            > > output one at a time or are you looking at a batch process? Or,
            do
            > you want
            > > the user to click on a point and have the software report the
            > coordinates to
            > > your software?
            > >
            > > Like I said, its doable, but first you need to nail down exactly
            > what you
            > > want. Then we can further help you.
            > >
            > > Lee
            > >
            >
            > I want to submit a coordinate one at a time and deduce what terrain
            > that coordinate lies within. So I submit (2345.67,6789.02) and it
            > looks at my map and says that's in a forest. The coordinate
            > submissions will occur one at a time. The user will not actually be
            > interacting with the map visually, just receiving information about
            > the environment of the coordinates. I figured that I would need to
            > divide the world into discreet polygons representing the terrain
            > zones so it would have something specific to compare to.
            >
            >
            > Thanks,
            > Ed
          • raorgen
            ... a ... That would be even better, but I wasn t sure it was doable. I figured I d have better odds using marked zones, but of course I don t know how that
            Message 5 of 8 , Feb 19, 2002
              > What about basing the terrain type on the sorts of symbols used in
              a
              > specific area?
              >
              > Anna

              That would be even better, but I wasn't sure it was doable. I figured
              I'd have better odds using marked zones, but of course I don't know
              how that would be done either ;)
            • Bruce A. Carson
              OK Next Question: In order for a DLL or Intercom to work CC2 has to be running . You haven t explained whether this is to be a web application and whether
              Message 6 of 8 , Feb 19, 2002
                OK Next Question:
                In order for a DLL or Intercom to work CC2 has to be "running". You haven't
                explained whether this is to be a web application and whether all your users
                are actually going to own CC2...But your explaination of entering a
                coordinate indicates to me that you probably don't want CC2's GUI
                displaying.

                If this is the case, how about this solution:
                1) Draw your map
                2) Use "LIST" command to display all entities on the map
                3) Click on the "T" in the top left corner and SAVE-AS the list display to a
                file
                4) Write a VB program to parse the saved text list and look for the
                "closest" symbol
                The formula would be the Symbol Reference with the smallest value of:
                (x1 - x2)^2 + (y1 - y2)^2 , Where (X1,Y1) is the location entered by the
                user
                and (X2,Y2) is the Symbol Reference's location. In case you have forgotten
                your
                math classes, if you take the square root of the above calculated value you
                will
                have the distance to that symbol...

                Bruce


                -----Original Message-----
                From: raorgen [mailto:raorgen@...]
                Sent: Tuesday, February 19, 2002 9:01 PM
                To: cc2-dev-l@yahoogroups.com
                Subject: [cc2-dev-l] Re: matching coordinates with zone



                > What about basing the terrain type on the sorts of symbols used in
                a
                > specific area?
                >
                > Anna

                That would be even better, but I wasn't sure it was doable. I figured
                I'd have better odds using marked zones, but of course I don't know
                how that would be done either ;)


                To Post a message, send it to: cc2-dev-l@...
                To Unsubscribe, send a blank message to: cc2-dev-l-unsubscribe@...

                Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
              • raorgen
                It would be feasible to have CC2 running if need be. It s going to be a client-server app, so the server could have it running and communicate the results to
                Message 7 of 8 , Feb 20, 2002
                  It would be feasible to have CC2 running if need be. It's going to
                  be a client-server app, so the server could have it running and
                  communicate the results to the client.
                  However, your approach seems very workable, would save me the
                  trouble of mapping out the zone polygons, and looks to be actually a
                  much simpler process that what I was envisioning. Thanks man :)

                  Ed

                  --- In cc2-dev-l@y..., "Bruce A. Carson" <bac@w...> wrote:
                  > OK Next Question:
                  > In order for a DLL or Intercom to work CC2 has to be "running".
                  You haven't
                  > explained whether this is to be a web application and whether all
                  your users
                  > are actually going to own CC2...But your explaination of entering a
                  > coordinate indicates to me that you probably don't want CC2's GUI
                  > displaying.
                  >
                  > If this is the case, how about this solution:
                  > 1) Draw your map
                  > 2) Use "LIST" command to display all entities on the map
                  > 3) Click on the "T" in the top left corner and SAVE-AS the list
                  display to a
                  > file
                  > 4) Write a VB program to parse the saved text list and look for the
                  > "closest" symbol
                  > The formula would be the Symbol Reference with the smallest
                  value of:
                  > (x1 - x2)^2 + (y1 - y2)^2 , Where (X1,Y1) is the location
                  entered by the
                  > user
                  > and (X2,Y2) is the Symbol Reference's location. In case you
                  have forgotten
                  > your
                  > math classes, if you take the square root of the above
                  calculated value you
                  > will
                  > have the distance to that symbol...
                  >
                  > Bruce
                  >
                  >
                  > -----Original Message-----
                  > From: raorgen [mailto:raorgen@h...]
                  > Sent: Tuesday, February 19, 2002 9:01 PM
                  > To: cc2-dev-l@y...
                  > Subject: [cc2-dev-l] Re: matching coordinates with zone
                  >
                  >
                  >
                  > > What about basing the terrain type on the sorts of symbols used in
                  > a
                  > > specific area?
                  > >
                  > > Anna
                  >
                  > That would be even better, but I wasn't sure it was doable. I
                  figured
                  > I'd have better odds using marked zones, but of course I don't know
                  > how that would be done either ;)
                  >
                  >
                  > To Post a message, send it to: cc2-dev-l@e...
                  > To Unsubscribe, send a blank message to: cc2-dev-l-unsubscribe@e...
                  >
                  > Your use of Yahoo! Groups is subject to
                  http://docs.yahoo.com/info/terms/
                Your message has been successfully submitted and would be delivered to recipients shortly.