This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to project wtg model elements to GIS projection?

Hello everyone.

The model I built in WaterGEMS is not spatially drawn right. Now I have to spatially adjust the model so that it will line up with street shapefile of GIS.

I can not proceed on spatial adjustment unless theI model elements have some projection. I need to apply projection something like NAD 1983 State Plane... .... to the modeling elements. I tried manually to apply the projection from ArcToolBox but I was not able to .... So my question is: How can I apply the GIS projection to all the model elements.

Any help will highly be appreciated.

Musa.

Parents
  • Hi Musa,

    The key is that to do this, you need to know what Projection the coordinates of your WaterGems project corresponds to.  Otherwise this becomes really, really difficult!.   What I've written below assumes that you know this. 

    I've done similar things to this in the past, so I've put down the methods I know of, but there usually always are smarter ways!

    A WaterGems model file is not projection-aware. All it stores are X, Y values, and does not "know" its projection, so doing projection corrections inside WaterGems is not easy.  In stand-alone mode, it doesn't do any on-the-fly reprojections of background data, in part because it doesn't know its own projection to begin with.  In stand-alone it assumes background files have a common projection with the model.

    In the ArcGIS interface, you have to tell WaterGems the projection of the data so that it can pick a Map and Feature Dataset projection for display of the elements, but again you are "stuck" with having to use that projection in ArcGIS for your maps and feature dataset.  If you try to change this in ArcGIS, I suspect you will confuse it because you can end up with your Geodatabase features in one projection, and your model X, Y values still in the other projection.  The ArcGIS interface will reproject other background files to whatever ArcGIS Map projection is in use, however.

    Is your WaterGems project in a standard projection?

    If so:

    The easiest thing to do to make things line-up, in stand-alone interface, is re-project the SHP background files to the same projection as your WaterGems coordinates rather than try to do a translation to the WaterGems project.  You could use the "Project" tool out of the ArcGIS Toolbox.

    If not, and you want to "move" the model X, Y coordinates to align with a standard projection:

    1.  Use Flextables->Export to SHP tool.  Do this for every element type present in your project.  To make the operation fast, and to head-off other data management problems, I would recommend only exporting the Label field to the SHP file, with the exception of Pipes where you will want StartNode and StopNode, and I would probably also recommend Downstream Pipe for Pumps, Valves etc. to be safe.

    2.  Open the exported SHP files into whatever GIS Desktop package you are using.

    3.  I suspect WaterGems will not export a PRJ projection information file with the SHP files, since it doesn't know it (not sure with the ArcGIS interface, WaterGems may assume that the exported files have a projection the same as the associated Geodatabase Feature Dataset).  So you will need to Define the projection of the exported SHP files to be whatever the model projection  is.  ("Define Projection" in ArcToolbox)

    4.  Use the GIS Desktop re-projection tools to change the projection on the exported SHP files.  Again, you could use the ArcGIS "Project" tool to do this.  Make sure you use a Projected Coordinate System, as these project to Eastings/Northings rather than Lat/Longs.

    5.  Using WaterGEMs ModelBuilder, re-import the SHP files.  This will adjust the X, Y coordinates of all the model elements to the changed projection.  It is preferable NOT to use the "Establish connectivity using spatial data" option, and you won't need to if you have exported Start/StopNode labels for pipes etc.

    The above works for any interface, but a variation for the ArcGIS interface, which may be simpler is:

    1.  Do a batch export of all your model features to another Geodatabase, and make sure Label is exported.  You can use "Feature Class to Geodatbase (Multiple)" Tool.

    2.  Re-project the Geodatabase feature classes/feature dataset you exported to, again something like the "Project" tool will do it.

    3.  As above, use ModelBuilder to update the WaterGems X, Y coordinates from the Geodatabase you have exported to.

    Oh, and as with any ModelBuilder operations like this, your Element Labels need to be unique!

    Ben



Reply
  • Hi Musa,

    The key is that to do this, you need to know what Projection the coordinates of your WaterGems project corresponds to.  Otherwise this becomes really, really difficult!.   What I've written below assumes that you know this. 

    I've done similar things to this in the past, so I've put down the methods I know of, but there usually always are smarter ways!

    A WaterGems model file is not projection-aware. All it stores are X, Y values, and does not "know" its projection, so doing projection corrections inside WaterGems is not easy.  In stand-alone mode, it doesn't do any on-the-fly reprojections of background data, in part because it doesn't know its own projection to begin with.  In stand-alone it assumes background files have a common projection with the model.

    In the ArcGIS interface, you have to tell WaterGems the projection of the data so that it can pick a Map and Feature Dataset projection for display of the elements, but again you are "stuck" with having to use that projection in ArcGIS for your maps and feature dataset.  If you try to change this in ArcGIS, I suspect you will confuse it because you can end up with your Geodatabase features in one projection, and your model X, Y values still in the other projection.  The ArcGIS interface will reproject other background files to whatever ArcGIS Map projection is in use, however.

    Is your WaterGems project in a standard projection?

    If so:

    The easiest thing to do to make things line-up, in stand-alone interface, is re-project the SHP background files to the same projection as your WaterGems coordinates rather than try to do a translation to the WaterGems project.  You could use the "Project" tool out of the ArcGIS Toolbox.

    If not, and you want to "move" the model X, Y coordinates to align with a standard projection:

    1.  Use Flextables->Export to SHP tool.  Do this for every element type present in your project.  To make the operation fast, and to head-off other data management problems, I would recommend only exporting the Label field to the SHP file, with the exception of Pipes where you will want StartNode and StopNode, and I would probably also recommend Downstream Pipe for Pumps, Valves etc. to be safe.

    2.  Open the exported SHP files into whatever GIS Desktop package you are using.

    3.  I suspect WaterGems will not export a PRJ projection information file with the SHP files, since it doesn't know it (not sure with the ArcGIS interface, WaterGems may assume that the exported files have a projection the same as the associated Geodatabase Feature Dataset).  So you will need to Define the projection of the exported SHP files to be whatever the model projection  is.  ("Define Projection" in ArcToolbox)

    4.  Use the GIS Desktop re-projection tools to change the projection on the exported SHP files.  Again, you could use the ArcGIS "Project" tool to do this.  Make sure you use a Projected Coordinate System, as these project to Eastings/Northings rather than Lat/Longs.

    5.  Using WaterGEMs ModelBuilder, re-import the SHP files.  This will adjust the X, Y coordinates of all the model elements to the changed projection.  It is preferable NOT to use the "Establish connectivity using spatial data" option, and you won't need to if you have exported Start/StopNode labels for pipes etc.

    The above works for any interface, but a variation for the ArcGIS interface, which may be simpler is:

    1.  Do a batch export of all your model features to another Geodatabase, and make sure Label is exported.  You can use "Feature Class to Geodatbase (Multiple)" Tool.

    2.  Re-project the Geodatabase feature classes/feature dataset you exported to, again something like the "Project" tool will do it.

    3.  As above, use ModelBuilder to update the WaterGems X, Y coordinates from the Geodatabase you have exported to.

    Oh, and as with any ModelBuilder operations like this, your Element Labels need to be unique!

    Ben



Children
No Data