# How to flip a polyline based on a separate polyline feature class being left or right to it

Can't go into detail about what these features actually are but I will just refer to them as the green line and the black line. The black lines are not able to ever overlap the blue polygons. Black lines have a specific orientation depending on which side the closest green line is.

What I'm trying to do is create a script which would be able to determine if the closest green line is either right or left to the black line, then determine if the black line is oriented correctly or not based on the rules I drew out within the attached image. If it isn't then it would flip the black line.

I've used the FeatureVerticesToPoints_management tool and SplitLine_management tool to split both the polylines into individual parts and retrieve midpoint X and Y coordinates as well as individual vertex X and Y coordinates of both lines.

I've been using the formula (Bx - Ax) * (Cy - Ay) - (By - Ay) * (Cx - Ax) where A and B are line vertices of the green line and C is the midpoint vertex of the black line. This has created a positive or negative value signifying which side point C is on compared to the line but I do not know how to setup rules for how the black line should be orientated afterwards. I believe the answer lies within checking the black line's azimuth.

My original idea was that using that formula I could determine which side the black line was on, then check if the azimuth of the black line is within 180deg of the the azimuth of the green line, and if it wasn't, it would flip the black line. But since the green line can be orientated in it's opposite direction, and be acceptable, the 180deg rule turns into a 360deg rule and the black line can then go any direction it wants.

I've been calculating the azimuth of each line using:

def CalculaAzimuth(linea): if (hasattr(linea,'type') and linea.type == 'polyline'): xf = linea.firstPoint.X yf = linea.firstPoint.Y xl = linea.lastPoint.X yl = linea.lastPoint.Y dX = xl - xf dY = yl - yf PI = math.pi Azimuth = 0 #Default case, dX = 0 and dY >= 0 if dX > 0: Azimuth = 90 - math.atan( dY / dX ) * 180 / PI elif dX < 0: Azimuth = 270 - math.atan( dY / dX )* 180 / PI elif dY < 0: Azimuth = 180 return Azimuth else: return False

Hopefully I understood correctly what you are asking, here is a method to determine if a point is on the left or right of a vector.

Given the a triangle created from the first and second point on the black line and the nearest point on the green line.

Determining if this is Clockwise or Anti Clockwise will indicate if the nearest point is on the left or the right side of the initial vector.

Calculating the determinent where x1,y1 = Point 1; x2,y2 = Point 2 and x3,y3 = Nearest Point.

The positive value for(x2 * y3 + x1 * y2 + x3 * y1) - (x2 * y1 + x1 * y3 + x3 * y2)indicates left hand side whereas negative is the right hand side.

So if this returns a positive value you will need to reverse your line.

Depending on position of line segments this process might help:

1. Create polygon using end points and existing order of points:

1. Create polygon using end points - existing order of points for black line, flipped green line:
2. Compare 2 polygons' areas. They are shown as red labels on the pictures. Note that it is smaller for 'same' direction segments. You might as well compare parts count of resulting shapes.

This int doesn't change value when your app is drawing the polylines for each route. If you want different colors for different polylines, you will need to make changes so that this variable's value changes. For example, you could have a counter initially set to 0 in the for loop that increments each time a polyline is drawn. You could then add a conditional to set the color depending on what the count is. I'll rewrite your onDirectionsFinderSuccess function:

#### Hot Network Questions

I'm on Maximo Spatial 7.6.0.3 but it should not be too far off since the concepts and design are very much still the same.

CALCULATEDX and CALCULATEDY are fields that are used by Maximo Anywhere to plot work orders on a mobile map. They are updated by the WoAutoLocateCronTask cron task. These two fields, at least on the version that I'm at, will not be used by Maximo to render anything on the map tab.

You have to have any one of these references available in order to plot a work order on the map:

• Service address with longitudex and latitudey populated
• An asset that is linked to your GIS through a feature class
• A location that is linked to your GIS through a feature class

Note: in the last three cases above the geometry info lives in GIS, there is no need to store them in Maximo.

Maximo Spatial 7.6.x links your MBO objects to your GIS features via web services published on a GIS server (I know there have been some changes on Spatial 7.6.1 but, basically, it still uses web services to locate your records).

What the auto-create function does is to add a record to your GIS feature table and generate the link via the feature class attribute. You naturally have to have your map services, feature classes, and everything else configured in the Map Manager application. Auto-create will try to determine the geometry by looking at the service address (if it has LONGITUDEX and LATITUDEY populated) or the asset/location reference (if they are linked to a feature in GIS). Auto-create needs to start off somewhere, it can't just make up a pair of coordinates out of the blue for a work order.

Maximo Spatial does not store the geometry in Maximo. It relies on GIS to show them on the map. You can definitely write logic to fetch the geometry from a GIS feature. If you want to use that info to show your work orders on the map, you should store them on the LONGITUDEX and LATITUDEY fields of the associated service address, not the CALCULATEDX and CALCULATEDY work orders attributes.

Try to get the geometry directly from the IPointCollection object, something like this:

Apply the geometry to the shape property using the IFeature interface:

BTW: If you are creating a feature inside a feature class, why not use the IFeature and IFeatureClass interfaces, instead of ITable and IRow ? There are a lot of problems using the "Shape" string directly to get the shape field, due to the name depends on the database type.

There are a few things in your code that I won´t mention in the comments to make it easier to read them.

First off you should definitly cash the results of searching for a field. Doing this within a loop is not recommended.

However - and this is the second point - you won´t need to search for the shape-field, you can simply take the geometriy-field from the featureclass - no need to cast to ITable .

Third your loop never terminates as your reference to _outVertex is allways the same. I assume you want to get the next vertex within your collection using _enumVertex.Next(out _outVertex, out partIndex, out vertexIndex) .

Fourth you don´t need to cast to IGeometry as IPoint should already inherit that interface. Thus everything implementing the latter should also implicitely implement the former interface.

Fifth and last you can directly access and iterate the IPointCollection without casting to IEnumVertex .

Yes you can! Just tested this and it works great, this is awesome! It still doesn't work with html, but it does with svg.

And my test.svg looks like this:

You can add the SVG as background-image of an empty :after or :before .

make sure your svg doesn't contain double quotes, and uriencode any # symbols.

Convenient tool for SVG encoding url-encoder

Making use of CSS sprites and data uri gives extra interesting benefits like fast loading and less requests AND we get IE8 support by using image/base64:

To extend further this topic. In case you want to add Font Awesome 5 icons you need to add some extra CSS.

Icons by default have classes svg-inline--fa and fa-w-* .

There are also modifier classes like fa-lg , fa-rotate-* and other. You need to check svg-with-js.css file and find proper CSS for that.

You need to add your own color to css icon otherwise it will be black by default, for example fill='%23f00' where %23 is encoded # .

Be careful all of the other answers have some problem in IE.

Lets have this situation - button with prepended icon. All browsers handles this correctly, but IE takes the width of the element and scales the before content to fit it. JSFiddle

Solution is to set size to before element and leave it where it is:

The background-image + background-size solutions works as well, but is little unhandy, since you have to specify the same sizes twice.

## CONCLUSIONS

This paper introduced an automated method for accuracy assessment of ridge and valley features using high-resolution DEMs such as those derived from airborne LiDAR data. The development of a Python add-in toolbar for automated accuracy assessment of ridge and valley features in ArcGIS was also presented. Compared with some existing methods for positional accuracy assessment of linear features, the new method has two major features: (1) As reference points are obtained from a high-resolution DEM on-the-fly, a reference source does not need to be readily available as a linear feature layer in GIS and (2) the new method not only produces statistical results of positional accuracy following the National Standard for Spatial Data Accuracy but also identifies locations where inaccuracies occur. The second feature allows users to run accuracy assessment, identify and correct the errors, and rerun accuracy assessment until satisfactory accuracy results are produced. The initial experiments of the Python add-in using LiDAR-derived DEMs from two study areas show that it takes only seconds to complete the whole process described in the pseudocode for ∼100 random points.

Some limitations of the method are discussed here. Firstly, the scale and resolution of the tested source and reference should be taken into account. For example, comparing regional-scale (small-scale) ridge and valley features with high-resolution (less than 5 m) DEMs may not be suitable because minor changes in the tested source (such as polyline generalization) may create large positional errors when compared with high-resolution DEMs. Secondly, even for large-scale valley polylines, the method works better for V-shaped valleys than U-shaped valleys, because U-shaped valleys may have multiple local minima which make automated assessment difficult. Further study is needed to address the second limitation.

This is a simple and straight-forward example using a base64-encoded Font Awesome icon as background image for the select box.

In addition a link to Icomoon App, used to create the png image of the icon used.

The default select arrow icon is drawn by the browser. There is no API for you to tell the browser to replace the arrow icon, so you will need to restyle the select element and overlay your own arrows. You can draw your own arrows that have an identical style to your browser's arrows, but remember that the default icon will differ for other browsers and operating systems.

To restyle the select item using only CSS you will need to target both the select and its parent p element. The select has an ID, which is easy to target, but targeting that specific p element is not easy from just the code you've provided. However looking at the provided Wordpress site link there is a label just before the p , of the form <label for="search-box-filter_31">Name of Institution</label> . This means that the p element can be targeted using the CSS selector label[for=search-box-filter_31] + p .

You first need to ensure you have enough space for your new arrow. This is accomplished by increasing the select's width by the width of your new arrows, and adding the same amount to the parent p 's right padding. One way to change the select's width is by using calc(100% + 30px) . If your new arrows have the same width as the default icons you may not need to do this, but in some configurations your arrows may overlap the select's content.

Additionally the p element must shrink to fit its content. There are a few ways of doing this, but in your situation the one least likely to break formatting is setting display: table .

Finally, you can use the ::after pseudo element on p to create the desired arrows, and overlay it on the end of your select element, hiding the default arrow. In the example below I created the arrows with inline SVG, but you can use any background image that best suits your situation. Set the ::after element to have position:absolute and style it to fit exactly over the right hand side of the select. To create the blue gradient background under the arrows that you have in your image, use multiple backgrounds with the first being your arrows and the second being a CSS gradient.

Note that since the ::after element is on top of the select, clicking the arrows will not display the options. You can set pointer-events: none to pass the clicks through but this will not work on IE.

The CSS is below, or alternatively you can see it at the codepen https://codepen.io/jla-/pen/ZqbWMj

The result (followed by the default select as it appears in Firefox on Linux):

## How to flip a polyline based on a separate polyline feature class being left or right to it - Geographic Information Systems

If you choose to, you can still use your Services account to login. However, with Kerberos and certificate authentication options now available, you can significantly reduce number of times you need to type in your password throughout your work week. Read on to see which option is right for you. --> You can choose any of the following options to access an SSO-enabled application

On-site Fermi Windows system - Recommended for users who
- are on-site (or logged in to VPN) and
- use a Windows computer in the FERMI domain (this includes the vast majority of Fermilab-owned Windows computers) and - use an Internet Explorer, Edge or Chrome browser

Kerberos (FERMI or FNAL) - Recommended for users who
- are on-site (or logged in to VPN) and
- use a Mac or Linux/Unix computer and
- use a browser configured for Kerberos authentication and
- have a valid Kerberos ticket from either the FNAL.GOV or the FERMI.WIN.FNAL.GOV realm

Fermilab CILogon certificate - Recommended for users who
- use a password or otherwise protected device or computer, which is not shared with others and
- use any browser on any operating system, including mobile and
- have a CILogon Silver CA certificate imported in your browser that was obtained using Fermilab credentials

## Abstract

Scan-to-BIM of existing buildings is in high demand by the construction industry. However, these models are costly and time-consuming to create. The automation of this process is still subject of ongoing research. Current obstacles include the interpretation and reconstruction of raw point cloud data, which is complicated by the complexity of built structures, the vast amount of data to be processed and the variety of objects in the built environment. This research aims to overcome the current obstacles and reconstruct the structure of buildings in an unsupervised manner. More specifically, a novel method is presented to automatically reconstruct BIM wall objects and their topology. Key contributions of the method are the ability to reconstruct different wall axis and connection types and the simultaneous processing of entire multi-story structures. The method is validated with the Stanford 2D–3D-Semantics Dataset (2D–3D-S).

## Product Comparison

Chief Architect Premier and Interiors include 2D design, elevations, cross sections, 3D design, 3D visualization, and construction drawing tools.

Chief Architect Premier is the best software product for full residential or light commercial design—everything outside and inside the house. Premier includes all the features of Interiors.

Chief Architect Interiors is ideal for kitchens, baths, and interior design&mdasheverything inside the house. Framing and exterior tools such as terrain are excluded. Chief Architect Interiors is fully compatible with Premier.

### 3D Rendering & Visualization

Perspective and Orthographic 3D Camera tools

Create 3D presentation views and 2D technical views using camera tools for real-time representations of your designs. Use layers to turn off or on different elements, like framing. Camera views can be named, edited, saved, and copied. Use 3D Settings Controls to adjust the display options and settings.

3D Navigation Tools & Virtual Tours

Create 3D views and navigate, spin, rotate, pan, orbit, tilt, and move forward or backward. Use the View Direction Tools to quickly set the view to top down, left side, right side or bottom angles.

Auto-Hide Exterior Walls While Navigating

Set navigation camera views to automatically hide the backs of walls that prevent seeing into a small room. Use the Hide Camera-Facing Exterior walls tools to easily navigate small rooms.

Show views being cut from the top, bottom, front, back, left and right side. Adjust the amount cut away from the model.

Create detailed walkthrough recordings along paths that you can save and share in standard video formats. Add key frames at any point on the spline to control view direction and speed walk up or down stairs and to span walkthrough between floors.

Export 360° Spherical Views

Ray Traced and Rendered cameras can be shared locally and to the cloud, and in apps and embedded in websites for interactive navigation. Export Render Views at a resolution of up to 8192 x 4096.

Artistic Rendering Techniques

3D Standard, Physically Based, Watercolor, Squiggle Line Drawing, Technical Illustration, Painting, Vector View, Glass House, and DuoTone render modes transform the look and feel of a scene in real-time.

Import images from building site, or use a generic scene, to add realistic backgrounds to your renderings. Set up saved cameras to leverage different backdrops to show different scenes for different cameras in the same project.

Photo Realistic Ray Trace Rendering

Ray Trace rendering uses multiple core processors with lighting and materials that can be set for photo realistic rendering. Preview ray trace renders as they refine and iterate image quality export the image at any time or define the total ray trace duration. Pause and resume Ray Traces and queue multiple scenes for processing. Export common image formats for presentations and marketing use.

Set up camera defaults to leverage Default Sets in your Template plans and for projects for example, control the Dimensions Defaults used for Wall Elevations vs. Cross-Sections.

View designs from any of the eight standard Isometric viewing angles.

Control the darkness of shadows in Vector Views and Technical Illustration views using an intensity slider.

### Cross Sections & Elevations

Cross Sections, Back-Clipped Cross Sections & Elevations

Use orthographic cameras to create elevation or cross section views. Back-Clipped Cross Section views control the cut distance generated for a cross section. Cross Sections can also be clipped at the sides to control the width of view.

Dimension, Annotate and Detail Cross Sections & Elevation Views

Use the text, arrow, dimension, and CAD tools to add complete details to your Cross Section and Elevation views. Select and edit, delete, resize, or move objects. Choose from over 500 CAD Details in the premium SSA catalog to overlay on your design. Use the Auto-Detail tool to add CAD details to cross-section and elevation views.

Easily set up view callouts directly from the camera object. Show Elevation, Section, and Cross-Section cameras as Callouts in Plan Views. Add callout labels and descriptions callouts remain when sent to layout.

Automatically Populate Camera Callouts with Layout Page Information

Choose to include layout page label in camera callout second line text. Callout information automatically updates if layout label is changed.

Automatic Labels in Elevations

Generate schedule callouts and labels for windows, doors, cabinets, and other items in Cross-Section and Elevation views.